html标签自带样式总结

一、html标签自带样式

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~h6, address, blockquote, form, dd, dl, dt, fieldset, frame, frameset, noframes, center, dir, hr, menu, pre { display: block; }

//列表元素

li { display:list-item; }

ol { list-style-type:decimal; }

ol ul, ul ol, ul ul, ol ol { margin-top:0; margin-bottom:0; }

//标题

h1 { font-size:2em; margin:0.67em 0; }

h2 { font-size:1.5em; margin:0.75em 0; }

h3 { font-size:1.17em; margin:0.83em 0; }

h4, p, blockquote, ul, fieldset, form, ol, dl, dir, menu { margin:1.12em 0; }

h5 { font-size:0.83em; margin:1.5em 0; }

h6 { font-size:0.75em; margin:1.67em 0;}

h1, h2, h3, h4, h5, h6, b, strong { font-weight:bolder; }

//表格

table { display:table; }

tr { display:table-row; }

thead { display:table-header-group; }

tbody { display:table-row-group; }

tfoot { display:table-footer-group; }

col { display:table-column; }

colgroup { display:table-column-group; }

td, th { display:table-cell; }

caption { display:table-caption; }

th { font-weight:bolder; text-align:center; }

caption { text-align:center; }

table { border-spacing:2px; }

thead, tbody, tfoot { vertical-align:middle; }

td, th { vertical-align:inherit; }

//其他元素

blockquote { margin-left:40px; margin-right:40px; }

pre, tt, code, kbd, samp { font-family:monospace; }

pre { white-space:pre; }

big {font-size:1.17em; }

small, sub, sup { font-size:0.83em; }

sub { vertical-align:sub; }

sup { vertical-align:super; }

s, strike, del { text-decoration:line-through; }

hr { border:1px inset; }

u, ins { text-decoration:underline; }

center { text-align:center; }

abbr, acronym { font-variant:small-caps; letter-spacing:0.1em; }

二、清除默认样式

1、清除页边距

body {

  margin: 0;

  paddin: 0;

}

2、清除段间距

p {

  margin-top: 0;

  margin-bottom: 0;

}

3、清除列表样式

ul {

  list-style-type: none;

  margin-left: 0;

  padding-left: 0;

}

4、清除超链接样式

a {

  text-decoration: none;

  color: rgb(...);

}

a:link { color: rgb(...); }

a:hover { color: rgb(...); }

a:active { color: rgb(...); }

a:visited { color: rgb(...); }

时间: 2024-08-27 08:45:51

html标签自带样式总结的相关文章

HTML CSS标签类型转换、样式重置 、前段规范

HTML CSS 基础 标签默认值样式重置: (css reset)包含: body,p,h1,h2,h3,h4,h5,h6,dl,dd外边距 字体 ol,ul,a,img等标签的默认值样式重置 用群组进行重置 标签基本特性和转换 块和内嵌的特性及区别: 内联,内嵌,行内属性标签: 1.默认同行可以继续跟同类型标签 2.内容撑开宽度 3.不支持宽高 4.不支持上下的margin和padding 5.代码换行被解析 快属性: 1.默认独占一行显示 2.没有宽度时,默认撑满一排 display:bl

HTML常用标签及CSS样式选择器

HTML常用标签及CSS样式选择器 html部分 <!DOCTYPE html> <html> <head> <!--头标记 写描述性的信息(css\javaScript)--> <!--引入外部的样式文件 rel:relationship的英文缩写·REL属性用于定义链接的文件和HTML文档之间的关系 --> <link rel="stylesheet" type="text/css" href=&

bootstrap对HTML标签的默认样式有哪些修改?

CSS Reset:重新设置HTML标签的默认样式. (1)重设了盒子模型的计算方法 * { box-sizing: border-box; } (2)重设了所有元素的默认字体 14px/1.42857143 "Helvetica Neue" (3)body { margin: 0; color: #333; background-color: #fff;} (4)h1~h6 { font-size: xxpx; margin-top: 20px/10px; margin-botton

用Jquery动态append方式加入标签时Css样式丢失的解决方法

一般在Jquery中会用下面的方式来添加新标签: var obj = "<fieldset data-role='controlgroup' data-type='vertical' data-role='fieldcontain'> <input id='menu0" type='checkbox'/><label for='menu0'> 复选框 </label> </fieldset>";  //按个人要求拼接

原创: Vuejs实现单文件组件新方法,带样式

代码如下: example.html 1 <script src="vue.js"></script> 2 <div id="example"> 3 <h3>Vue component<h3> 4 <counter></counter> 5 <counter></counter> 6 </div> 7 //引入组件mycomp.js 8 <s

[寒江孤叶丶的Cocos2d-x之旅_33]RichTextEx一款通过HTML标签控制文字样式的富文本控件

RichTextEx一款通过HTML标签控制文字样式的富文本控件 原创文章,欢迎转载.转载请注明:文章来自[寒江孤叶丶的Cocos2d-x之旅系列] 博客地址:http://blog.csdn.net/qq446569365 下载地址 Github链接 这个是干什么的 将例如以下文字内容 "<#F37C2A><font Helvetica><30>[世]<#3AB5B3><underLine true>寒江孤叶<underLine

[js开源组件开发]html5标签audio的样式更改

html5标签audio的样式更改 由于html5的流行,现在移动端大多数的需求都可以使用audio来播放音频,但您可能只是需要很简单的播放/停止效果,但不同的浏览器上的audio样式却不尽人意,所以我简单的把它进行了封装,效果如下: 作为技术实现,它的原理比较简单,就是把原生的audio隐藏,然后用div来显示播放器的效果,然后调用它的click事件来触发play和stop,然后是时长duration,这个值有时能够获取,有时不行,比较坑,所以建议在audio标签上自定义duration属性存

(转)Android系统自带样式(@android:style/)

在AndroidManifest.xml文件的activity中配置 1.android:theme="@android:style/Theme" 默认状态,即如果theme这里不填任何属性的时候,默认为Theme 2.android:theme="@android:style/Theme.NoDisplay" 任何都不显示.比较适用于只是运行了activity,但未显示任何东西 3.android:theme="@android:style/Theme.

Android自带样式

Android系统自带样式: android:theme="@android:style/Theme.Dialog" 将一个Activity显示为对话框模式 android:theme="@android:style/Theme.NoTitleBar" 不显示应用程序标题栏 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不显示应用程序标题栏,并全屏 android:theme