您现在的位置:首页 >> 前端 >> 内容

CSS常用代码命令

时间:2017/9/22 9:33:00 点击:

  核心提示:display: none; 隐藏text-align:center; 文本居中align-items: center; DIV居中font-weight: bold 文本加粗margin: 20rp...

display: none; 隐藏

text-align:center; 文本居中

align-items: center; DIV居中

font-weight: bold 文本加粗

margin: 20rpx 0rpx 20rpx 0rpx; 外边距

border-radius:50%; 圆角

display: flex;

flex-direction: column; 横向

.pr{position: relative;}

.pa{position: absolute;} 定位

.zishiyin{justify-content: space-around;} 宽度占比自适应,小程序

.ellipsis {

text-overflow: ellipsis;

white-space: nowrap;

overflow: hidden;

display: block;} 文字超出省略

.tl{text-align: left;}

.tc{text-align: center;}

.tr{text-align: right;} 对齐

.bte{border-top:solid 1px #eee;}

.bbe{border-bottom: solid 1px #eee;}

.bre{ border-right: 1px solid #eee} 边框

.fl_l{ float: left;}

.fl_r{ float: right;} 浮动

.cl_h{

clear: both;

height: 1px;

margin-top: 60px;

} 清除浮动

.text_zd{

width:200rpx;

text-overflow:ellipsis;

overflow:hidden;

font-size:28rpx;

color:#FF0000;

margin-top:10rpx;

text-align: center

} 超出部分的文字不显示

Tags:CS SS S常 常用 
作者:网络 来源:a_靖的博客