一、多列
1、column-count属性指定元素的列数应分为:
div{
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
column-count:3;
}
2、column-gap属性指定的列之间的差距:
指定列之间40个像素差距:
div{
-moz-column-gap:40px; /* Firefox */
-webkit-column-gap:40px; /* Safari and Chrome */
column-gap:40px;
}
3、column-rule属性设置列之间的宽度,样式和颜色。
指定列之间的宽度,样式和颜色的规则:
div{
-moz-column-rule:3px outset #ff00ff; /* Firefox */
-webkit-column-rule:3px outset #ff00ff; /* Safari and Chrome */
column-rule:3px outset #ff00ff;
}
二、按钮
1、基本按钮样式
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
<button>默认按钮</button>
<a href="#" class="button">链接按钮</a>
<button class="button">按钮</button>
<input type="button" class="button" value="输入框按钮">
2、按钮颜色
.button1 {background-color: #4CAF50;} /* Green */
.button2{background-color: #008CBA;} /* Blue */
.button3 {background-color:#f44336;} /* Red */
.button4 {background-color: #e7e7e7; color: black;} /* Gray */
.button5{background-color: #555555;} /* Black */
3、按钮大小
.button1 {font-size: 10px;}
.button2 {font-size: 12px;}
.button3{font-size: 16px;}
.button4 {font-size: 20px;}
.button5 {font-size: 24px;}
4、圆角按钮
.button1 {border-radius: 2px;}
.button2 {border-radius: 4px;}
.button3{border-radius: 8px;}
.button4 {border-radius: 12px;}
.button5 {border-radius: 50%;}
5、按钮边框颜色
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50; /* Green */
}
6、鼠标悬停按钮
.button {
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
}
.button:hover {
background-color: #4CAF50; /* Green */
color: white;
}
7、 按钮阴影
.button1 {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0rgba(0,0,0,0.19);
}
.button2:hover {
box-shadow: 0 12px16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
8、 禁用按钮
.disabled {
opacity: 0.6;
cursor: not-allowed;
}