时间:2019-07-19 编辑:
本文中所有这些按钮的结构只需要一个锚点标记就可以了,因为我们将使用:: before伪类创建其他元素。
例一:
首先,我们将给出按钮的一般样式,包括其活动状态。重要的是要注意相对定位,因为它将帮助我们稍后定位:: before元素:
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.a_demo_one {
background-color:#ba2323;
background-color
:
#ba2323
;
padding:10px;
padding
10px
position:relative;
position
relative
font-family: 'Open Sans', sans-serif;
font-family
'Open Sans'
,
sans-serif
font-size:12px;
font-size
12px
text-decoration:none;
text-decoration
none
color:#fff;
color
#fff
border: solid 1px #831212;
border
solid
1px
#831212
background-image: linear-gradient(bottom, rgb(<code class="css value" style="padding: 2px 4px; font-size: 13px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; margin: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; bottom: auto !important; float: none !important; left: auto !important; line-height: 1.5em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !importan
background-image
: linear-gradient(
bottom
rgb
(
以上就是CSS按钮如何实现?CSS按钮实现的几种方法介绍的详细内容,更多请关注php知识-学习天地 www.lxywzjs.com其它相关文章!
CSS按钮如何实现?CSS按钮实现的几种方法介绍
时间:2019-07-19 编辑:
本文中所有这些按钮的结构只需要一个锚点标记就可以了,因为我们将使用:: before伪类创建其他元素。
例一:
首先,我们将给出按钮的一般样式,包括其活动状态。重要的是要注意相对定位,因为它将帮助我们稍后定位:: before元素:
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.a_demo_one {
background-color
:
#ba2323
;
padding
:
10px
;
position
:
relative
;
font-family
:
'Open Sans'
,
sans-serif
;
font-size
:
12px
;
text-decoration
:
none
;
color
:
#fff
;
border
:
solid
1px
#831212
;
background-image
: linear-gradient(
bottom
,
rgb
(
<code class="css value" style="padding: 2px 4px; font-size: 13px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; margin: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; bottom: auto !important; float: none !important; left: auto !important; line-height: 1.5em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !importan以上就是CSS按钮如何实现?CSS按钮实现的几种方法介绍的详细内容,更多请关注php知识-学习天地 www.lxywzjs.com其它相关文章!