And*_*isu 14 css webkit google-chrome reset
在我的Chome 12中发生了奇怪的事情.
我几天前下载了最新的样板并在其上进行了设计.一切都很好.
5分钟前,Chrome(Webkit)突然决定在我的设计中插入额外的css规则:
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
Run Code Online (Sandbox Code Playgroud)
如何在不增加额外重置的情况下摆脱这种情况?
编辑:也遇到了h1元素的问题
-webkit-margin-before: 0.67em;
-webkit-margin-after: 0.67em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
Run Code Online (Sandbox Code Playgroud)
Edit2:我的重置包含
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup,
var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer,
header, hgroup, menu, nav, section, summary, time, mark, audio, video
{ margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }
Run Code Online (Sandbox Code Playgroud)
thi*_*dot 12
这些属性被margin和重写padding.
margin: 0; padding: 0如果你想要的话margin,只需设置即可padding.
这些属性不仅突然出现,而且它们永远存在于那里.
通过演示证明:http://jsfiddle.net/VNh3u/ - (很显然,请登录WebKit浏览器)
Pff,我的css文件中有错误的注释,禁用了重置...
| 归档时间: |
|
| 查看次数: |
32841 次 |
| 最近记录: |