如何开始使用css3

[英]How can i start using css3


I want to use css3 features like

我想使用css3的特性,比如

box-shadow

不必

so for that

所以对于这

  1. Do i need to include some special tag for css3 at top of page
  2. 我需要在页面顶部包含一些css3的特殊标签吗?
  3. which browsers currently support it
  4. 目前哪些浏览器支持它
  5. what will happen if use many css3 features and people view in old brosers.cause any error or so
  6. 如果使用许多css3特性和人们在旧的浏览器中查看会发生什么。引起任何错误。
  7. Should i really use it or not
  8. 我真的应该用它吗

2 个解决方案

#1


5  

Do i need to include some special tag for css3 at top of page

我需要在页面顶部包含一些css3的特殊标签吗?

No

没有

which browsers currently support it

目前哪些浏览器支持它

Most browsers support some CSS 3. No browser supports all CSS 3. When can I use tracks when support for various features was added.

大多数浏览器支持一些CSS 3。没有浏览器支持所有CSS 3。当添加对各种特性的支持时,我什么时候可以使用跟踪?

what will happen if use many css3 features and people view in old brosers.cause any error or so

如果使用许多css3特性和人们在旧的浏览器中查看会发生什么。引起任何错误。

Unless the browser is exceptionally buggy, the error handling rules of CSS will apply and the unrecognised thing will be ignored.

除非浏览器有异常的错误,否则CSS的错误处理规则将被应用,不被识别的东西将被忽略。

This is only a problem if another style (which does apply) will render content unreadable unless the unsupported style is also applied. This probably can sometimes be worked around by applying the same property twice. First with widely supported values, then with less widely supported ones: e.g.:

如果另一种样式(它确实适用)将使内容不可读,除非还应用了不受支持的样式,这只是一个问题。有时可以通过两次应用相同的属性来解决这个问题。首先是受广泛支持的值,然后是不受广泛支持的值:

color: white;
background: url(blue_0.5_pixel.png);
background: rgba(0%, 0%, 100%, 0.5);

Should i really use it or not

我真的应该用它吗

That needs to be determined on a case-by-case basis.

这需要根据具体情况来确定。

#2


0  

You use css3 just like regular css - no special declarations necessary. The only thing to keep in mind is that there are browser-prefix versions of many css3 styles that you'll want to use and while most of them use the style rules in exactly the same way, there are a few that have slightly different syntax (some older versions of Chrome, for example, use different gradient syntax.) When you do use the browser-prefix versions, always use the non-prefixed version as well following the prefixed versions. For example:

使用css3就像使用常规css一样——不需要特殊声明。唯一要记住的是,有browser-prefix版本很多css3的风格,你会想要使用,他们中的大多数在完全相同的方式使用样式规则,有几个稍有不同的语法(例如,一些老版本的Chrome浏览器使用不同的梯度语法)。当您使用浏览器前缀版本时,请始终使用非前缀版本,并遵循前缀版本。例如:

div {
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2011/07/04/6f8493b08d88f4893efc4bc75783f37b.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告