[移动端开发]移动端开发公共样式common.css

common.css

/*公共方法*/
*{
    padding: 0 0;
    margin: 0 0;   
/*点击高亮我们需要清除清除 设置为transparent 完成透明*/
    -webkit-tap-highlight-color: transparent;
}
html{
	width: 100%; 
	height: 100%; 
/*禁用WebKit内核浏览器调整文字大小功能,解决谷歌中字体最下12px。-webkit-text-size-adjust放在body上会导致页面缩放失效*/ 
	-webkit-text-size-adjust:none;
}
body{
 	margin: 0 auto;
	min-width: 320px;
	max-width: 640px;
	background: #fff;
	   /* 对字体进行抗锯齿渲染可以使字体看起来会更清晰舒服。 */
    -webkit-font-smoothing: antialiased;/*chrome、safari*/
    -moz-osx-font-smoothing: grayscale;/*firefox*/ 
}
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="tel"],
input[type="text"],
input,
button,
textarea{
/*在移动端浏览器默认的外观在iOS上加上这个属性才能给按钮和输入框自定义样式*/
	-webkit-appearance:none;
}
[v-cloak]{
/* Vue.js*/
    display: none;
}
div{
/*CSS3盒子模型*/
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
}

.float_l {
	float: left;
}

.float_r {
	float: right;
}

/*清除浮动*/
.clearAll:after {
	content: “.”;
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}  
.clear_left {
    clear: left;
}
.clear_right {
    clear: right;
} 
img,a {
/*禁用长按页面时的弹出菜单*/
	-webkit-touch-callout: none; 
 }
 a{
	text-decoration: none;
}
ul li{
    list-style: none;
}
.triangle_border_down {
	/* select 倒三角 */
    width: 0;
    height: 0;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #333 transparent transparent;
    position: absolute; 
    right: 15px;
    top: 40px;
}

/*文字内容超出隐藏*/
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.no-ellipsis {
    overflow: auto;
    text-overflow: initial;
    white-space: normal;
}

/*布局*/
.layout {
    width: 100%;
}
.container {
    margin: 0 auto;
    width: 1200px;
}

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值