先看下常用的这些标签浏览器的默认样式有哪些: body{ margin: 8px;} hr{ border:1px inset; margin-top:.5em;margin-bottom:.5em;} blockquote{margin: 16px 1em;} ul{list-style-type: disc;padding-left:40px;margin: 1em 0;} ol{list-style-type: decimal; padding-left:40px; margin:1em…
引:http://www.jb51.net/web/94964.html 文为大家整理了html标签默认样式属性及浏览器默认样式等等,喜欢css布局的朋友们可以学下,希望对大家有所帮助 html, address,blockquote,body, dd, div,dl, dt, fieldset, form,frame, frameset,h1, h2, h3, h4,h5, h6, noframes,ol, p, ul, center,dir, hr, menu, pre { display:…
button{ /*消除button的默认样式*/ /*这种写法是对所有的button标签同时生效*/ margin: 0px; padding: 0px; /*自定义边框*/ border: 0px; /*消除默认点击蓝色边框效果*/ outline: none; }…
使用 iPhone 上的浏览器去浏览网页的时候,按钮总是显示超大圆角的样式,显得超级恶心,但是我们自己定义 border-radius 为 0 也无法去除这个圆角,经过搜索发现这是 webikt 内核浏览器通过私有属性 -webkit-appearance 对控件设置了默认样式. 我们只要对按钮设置这个属性,并设置为 ‘none’ 就可以取消浏览器对于控件的默认样式. input {-webkit-appearance:none; /*去除input默认样式*/} 另外这个属性也有个神奇的地方,…
1.小三角,通过给一个div设置足够大的边框,让它的上边框,右边框,左边框,的背景颜色设置成透明的,来实现,如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #demo { width: 0; height: 0; /*边框的宽20px*/…
body    有默认的内外边距(margin:0;padding:0); p         有默认的外边距(margin:0;)…
a { text-decoration: none;//去掉下划线 color: inherit; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-appearance: none; -webkit-text-size-adjust: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-touch-callout: no…
head{ display: none } body{ margin: 8px;line-height: 1.12 } button, textarea,input, object,select { display:inline-block;} ol, ul, dir,menu, dd{ margin-left: 40px } i, cite, em,var, address{ font-style: italic } //块级元素 html, body, div,ol, p, ul, h1,…
input{-webkit-appearance: none; -moz-appearance: none; -o-appearance: none; appearance: none;}…
Normalize.css 与 reset.css都是初始化页面样式 不同点在于 reset.css更加粗暴,直接把所有的样式全部初始化了: Normalize.css还剩点良心,还保留了一些浏览器默认样式,并且对不同浏览器之间还有兼容代码. 这个两个页面初始化css我觉得都可以用,但是用地方还需要考究下. 比如reset我更倾向于在H5的页面中使用,因为我完全不必为标签的样式不同烦恼. normalize应该是比较适合应用开发或者m站点开发,说一个比较现实的例子,比如站点中的新闻页面,这个页面…