CSS code templates reset the default style reset.css

    Because of the major browser compatibility issues, the same performance under different CSS properties are not necessarily the same browser, experienced front-end designers will customize a browser-style CSS reset file, define in this file for different browsers show the same final code, we are most familiar is perhaps the * {margin: 0 0}, but in fact this is the easiest of the compatibility of the code, under normal circumstances, only this is not enough, therefore I collected reset.css code templates used several front-end design of the site, when you need to copy the code reset.css saved as a file, then reference to the required html file.

Note: You can modify the definitions in the selector code based on your own situation, if it is determined no access code defined for some selectors may be removed.

CSS style code reset a browser:

body, UL, Li, P, h1 of, H2, H3, H4, H5, H6, IMG, br, HR, Table, TR, TD, DL, dt, dd, form { margin: 0; padding: 0; } body { font-family: Arial, "Microsoft elegant black"; font-size: 12px; color: #434343; } .clear { clear: both; font-size: 0px; } ul,li { list-style: none; } img { border: none; } / * General Link * / a { text-decoration: none; color: #555; } a: hover { color: #3366ff; }

The CSS browser code two Reset:

HTML, body, div, span, the applet, Object, iframes,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td { background: transparent; border: 0; margin: 0; padding: 0; vertical-align: baseline; font-size: 100%; font: inherit; -webkit-text-size-adjust: none; }
body { line-height: 1; }
table { border-collapse: collapse; border-spacing: 0; }
object, :focus { outline: none; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section /* HTML 5 */ { display: block; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
a img { border: none; }
input,button,textarea,select,optgroup,option{ font-size: 100%; font: inherit; }
.al { text-align: left; }
.ar { text-align: right; }
.ac { text-align: center; }
.lc { margin: 0 auto; }
.In, .The .In {float: left; }
.info, .info .the {float: right; }
.fc, .il .fc { float: none; clear: both; }
.rel { position: relative; }
.abs { position: absolute; }
.il { list-style: none; }
li {float .il: left;} 

CSS reset the browser code three: Eric Meyer from the website:

HTML, body, div, span, applet, Object, iframes.,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}
: focus {
	outline: 0;
}
body {
	line-height: 1;
	color: black;
	background: white;
}
ol, ul {
	list-style: none;
}
table {
	border-collapse: separate;
	border-spacing: 0;
}
caption, th, td {
	text-align: left;
	font-weight: normal;
}
blockquote: before, blockquote: after,
q: before, q: after {
	content: "";
}
blockquote, q {
	quotes: "" "";
}

Guess you like

Origin www.cnblogs.com/meijifu/p/12103787.html