CSS3基础学习(多列、按钮)(七)

一、多列

属性说明CSS
column-count指定元素应分为的列数3
column-fill指定如何填充列3
column-gap指定列之间差距3
column-rule一个用于设置所有列规则的简写属性3
column-rule-color指定的列之间颜色规则3
column-rule-style指定的列之间的样式规则3
column-rule-width指定的列之间的宽度规则3
column-span指定一个元素应该横跨多少列3
column-width指定列的宽度3
columns缩写属性设置列宽和列数3

 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;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值