Self-use public style common.css (with comments)

Web development generally requires public style css files. For this reason, it is necessary for a front-end engineer to have his own public style. The following is 2 common.css code that I use myself, for reference only, suitable for beginners, don't spray. Not much to say, code!
body, html,div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td { margin:0; padding:0; box-sizing: border-box; } body { font-size:16px; color:#666; font-family: Microsoft YaHei,SimSun; background: #fff; } textarea, input, button, select { outline : none; } li { list-style: none; } img { border: 0; } a{ color:#666; text-decoration: none;

























}

a:hover { color:#666; text-decoration: none; } / Content beyond hidden / .txt_overflow{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } / Left float / .fl { float: left; } / right float / .fr { float: right; } / clear float / .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } / elements hidden / .txt_none{ display: none;




























}
/ Add a horizontal line after the element /
.after_line:after{ content:''; position: absolute;/ Locate the position of the background horizontal line / top:50%; left:50%; background:rgb(255,125,0,0.8) ; / Background horizontal line color / width: 65px; / one-side horizontal line length / height: 8px; border-radius: 5px; } / border rounded corners / .b_r{ border-radius: 5px; -webkit-border-radius : 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; }
















The advantage of writing a common style: you can abbreviate a lot of redundant code. Improve development efficiency. When dealing with bugs, you can quickly locate the problem.

Guess you like

Origin blog.csdn.net/Smell_rookie/article/details/87347790