页面样式默认初始化模板(个人笔记)

126 阅读1分钟
//移动端页面meta完美适配 单位可以使用px会自动适应
<meta name="viewport" content="width=设计稿宽度,user-scalable=no,viewport-fit=cover">
//css初始化样式
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: pingfang SC, helvetica neue, arial, hiragino sans gb, microsoft yahei ui, microsoft yahei, simsun, sans-serif !important;
}

*::-webkit-scrollbar
{
	width: 8px;
	background-color: #1144a3;
}
 
/*定义滚动条轨道 内阴影+圆角*/
*::-webkit-scrollbar-track
{
	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
	border-top-right-radius:5px ;
	border-bottom-right-radius:5px ;
	background-color: #123e90;
}
 
/*定义滑块 内阴影+圆角*/
*::-webkit-scrollbar-thumb
{
	border-radius: 8px;
	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
	background-color: #417ff1;
}


a {
    text-decoration: none;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
a:active {
    text-decoration: none;
}
ul,
li {
	padding: 0;
	margin: 0;
	list-style: none
}



html,body{
	width: 100%;
	height: 100%;
}
body{
	overflow-x: hidden;
}