• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
IT-nose
博客园    首页    新随笔    联系   管理    订阅  订阅

css 清除一些默认的设置

一、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;
}

  

posted @ 2018-08-01 17:17  detanx_墨鼬漓  阅读(599)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3