css 常用属性

/*浮动*/
.float-left {
	float: left;
}

.float-right {
	float: right;
}

/*清浮动*/
.clearfix:after {
	content: "";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}

.clearfix {
	*zoom: 1;
}

/*对齐*/
.text-center {
	text-align: center;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

/*定位*/
.relative{
	position: relative;
}
.absolute{
    position: absolute;
}
.fixed{
	position: fixed;
}

/*鼠标指针变成手形*/
.poniter{
    cursor:pointer
}

/*弹性布局  center居中对齐 space-between两端对齐 space-around沿轴线均匀分布 
           flex-start左对齐 flex-end右对齐*/
.elasticity{
    display: flex;
	flex-flow: wrap;
	justify-content: center;
	align-items: center;
}
.elasticity .item{
    flex-grow: 1
}

/*垂直居中 (需要父级 position: relative;)*/
.plumb-center {
	position: absolute;
    width:100%;
    height:100%;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}

/*文本超出显示省略号*/
.ellipsis {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ellipsis2 {
	overflow: hidden;
	display: -webkit-box;
	text-overflow: ellipsis;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ellipsis3 {
	overflow: hidden;
	display: -webkit-box;
	text-overflow: ellipsis;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/*设置滚动条样式*/
::-webkit-scrollbar {
	width: 0.2rem;
}
::-webkit-scrollbar-thumb {
	background: #535353;
}

属性 未定义Class

letter-spacing //文字间距

 

你可能感兴趣的:(css)