码迷,mamicode.com
首页 > Web开发 > 详细

css 清除一些默认的设置

时间:2018-08-01 18:22:27      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:orm   frame   exp   over   end   sam   列表   base   sid   

一、input标签的placeholder的设置

input::-webkit-input-placeholder{ /*WebKit browsers*/
  //重置样式
}
  
input::-moz-input-placeholder{ /*Mozilla Firefox*/
  //重置样式
}

input::-ms-input-placeholder{ /*Internet Explorer*/ 
  //重置样式
}

  
二、input标签的获得焦点的边框设置

//在input的css中加
outline:none 
或 
outline:medium;

input{ outline:medium;}
 /*获取焦点*/
input:focus{ 
  border: 1px dolid #EEE;
 }

  
三、去掉列表的默认样式

li {
	list-style-type: none;
}
ol, ul {
	list-style: none;
}

  
四、自己所用的css reset

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, 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,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: "微软雅黑";
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: bold;
}

fieldset {
	margin: 60px 0;
	text-align: center;
	border-top: 2px solid #61CDE7;
}

legend {
	padding: 0 80px;
	font-size: 22px;
	color: #61CDE7;    
}

a {
	text-decoration: none;
}

a:hover {
	cursor: pointer;
}

.fl {
	float: left;
}

.fr {
	float: right;
}

button {
	border: none;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}

ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: ‘‘;
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}

  

css 清除一些默认的设置

标签:orm   frame   exp   over   end   sam   列表   base   sid   

原文地址:https://www.cnblogs.com/detanx/p/cssReset.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!