- 1、本文档共11页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
网页设计师告诉你css十大密技(Web designers tell you ten CSS cheat)
网页设计师告诉你css十大密技(Web designers tell you ten CSS cheat)
1.css font shorthand rules
You might do this when you use CSS to define fonts:
Font-size: 1em;
Line-height: 1.5em;
Font-weight: bold;
Font-style: italic;
Font-variant: small-caps;
Font-family:, Verdana, serif;
In fact, you can abbreviate these properties:
Font:, 1em/1.5em, bold, italic, small-caps, Verdana, serif
Much better now, but one thing to note: use this way - at least you want to specify the font-size and font-family properties and other properties (such as font-weight, font-style, font-varient) if not specified will automatically use the default value.
2. use two class at the same time
Usually we specify only one class for attributes, but that doesnt mean you can only specify one. In fact, you can specify how many you want to specify, for example:
p class=, text side ... /p
By simultaneously using two class (separated by spaces rather than commas), this paragraph will apply the rules laid down in the two class. If any of the rules overlap, then the latter will get the actual priority application.
Default value for the border (border) in 3.css
When you write rules for a border, you usually specify colors, widths, and styles (in any order). For example: border: 3px solid #000 (3 pixels wide black solid border), in fact, the only specified value in this example is the style. If you specify the style as a solid line (solid), the rest of the values will use default values: the default width is medium (equivalent to 3 to 4 pixels); the default color is the text color in the border. If this is exactly what you want, you can definitely not specify in css.
4.! Important will be ignored by IE
In CSS, the usually specified rules are given priority. However, for browsers other than IE, any statement that is followed by important will get absolute priority, for example:
Margin-top:, 3.5em, important; margin-top: 2em
In addition to the top IE all browsers boundaries are 3.5em, IE and 2em, sometimes it is useful, espec
您可能关注的文档
- 小人物何以带来大感动(Small character Why bring great move).doc
- 古今伤病灾标志(Injury marks of ancient and modern diseases and injuries).doc
- 网站运营之思维模式分老聂析(The thinking mode of website operation of laonie analysis).doc
- 网络团购运营模式初探(Discussion on online group buying operation mode).doc
- 网络安全术语解释(第一版)-创意安天推荐(Explain the terms of network security (First Edition) - creative antiy recommended).doc
- 网站设计65条原则(65 principles of Web Design).doc
- 网络传播权探析(Analysis of network communication right).doc
- 网络幽默搞笑俏皮话(Network humor, funny, witty words).doc
- 网络推荐的创业者阅读书目(Web recommended entrepreneur reading list).doc
- 网络版全国教师资格认定管理信息系统任教学科对照表(Online version of the national teacher qualification accreditation management information system).doc
文档评论(0)