一款基于css3的動畫按鈕代碼教程
來源:易賢網(wǎng) 閱讀:617 次 日期:2014-11-27 10:42:16
溫馨提示:易賢網(wǎng)小編為您整理了“一款基于css3的動畫按鈕代碼教程”,方便廣大網(wǎng)友查閱!

為大家分享了很多款純css3實(shí)現(xiàn)的實(shí)用按鈕。今天給大家?guī)硪豢罨赾ss3的動畫按鈕。實(shí)現(xiàn)的效果圖如下:

名單

實(shí)現(xiàn)的代碼。

html代碼:

XML/HTML Code復(fù)制內(nèi)容到剪貼板

<div class="share-buttons">

<div class="share-button">

<div class="share-button-secondary">

<div class="share-button-secondary-content">

share on twitter

</div>

</div>

<div class="share-button-primary">

<i class="share-button-icon fa fa-twitter"></i>

</div>

</div>

<div class="share-button">

<div class="share-button-secondary">

<div class="share-button-secondary-content">

share on facebook

</div>

</div>

<div class="share-button-primary">

<i class="share-button-icon fa fa-facebook"></i>

</div>

</div>

<div class="share-button">

<div class="share-button-secondary">

<div class="share-button-secondary-content">

pin on pinterest

</div>

</div>

<div class="share-button-primary">

<i class="share-button-icon fa fa-pinterest"></i>

</div>

</div>

<div class="share-button">

<div class="share-button-secondary">

<div class="share-button-secondary-content">

share on tumblr

</div>

</div>

<div class="share-button-primary">

<i class="share-button-icon fa fa-tumblr"></i>

</div>

</div>

<div class="share-button">

<div class="share-button-secondary">

<div class="share-button-secondary-content">

share on google+

</div>

</div>

<div class="share-button-primary">

<i class="share-button-icon fa fa-google-plus"></i>

</div>

</div>

</div>

css3代碼:

CSS Code復(fù)制內(nèi)容到剪貼板

body

{

background: -webkit-linear-gradient(0deg, #FF8008 10%, #FFC837 90%);

background: linear-gradient(90deg, #FF8008 10%, #FFC837 90%);

padding: 2em;

text-align: center;

}

*

{

-moz-box-sizing: border-box;

box-sizing: border-box;

}

.share-buttons

{

position: absolute;

width: 300px;

height: 212px;

padding-left: 135px;

top: 50%;

left: 50%;

margin-left: -150px;

margin-top: -106px;

}

.share-buttons .share-button

{

float: left;

margin-top: 15px;

}

.share-buttons .share-button:first-child

{

margin-top: 0;

}

.share-buttons .share-button:after

{

clear: both;

display: table;

}

.share-button

{

display: block;

position: relative;

height: 30px;

}

.share-button:hover

{

cursor: pointer;

}

.share-button:hover .share-button-primary

{

box-shadow: 1px 0 0 0 rgba(0, 0, 0, 0.1);

}

.share-button:hover .share-button-secondary-content

{

-webkit-transform: translate3d(0, 0, 0);

transform: translate3d(0, 0, 0);

}

.share-button-primary

{

position: absolute;

background: #fff;

width: 30px;

height: 30px;

border-radius: 15px;

left: 0;

top: 50%;

margin-top: -15px;

}

.share-button-icon

{

display: block;

color: #242424;

position: absolute;

width: 30px;

line-height: 30px;

font-size: 16px;

margin-top: 1px;

}

.share-button-secondary

{

overflow: hidden;

margin-left: 15px;

height: 30px;

}

.share-button-secondary-content

{

font-family: sans-serif;

font-size: .75em;

background: #fff;

display: block;

height: 30px;

text-align: left;

padding-left: 24px;

padding-right: 18px;

line-height: 30px;

color: #242424;

border-radius: 0 15px 15px 0;

-webkit-transform: translate3d(-100%, 0, 0);

transform: translate3d(-100%, 0, 0);

-webkit-transition: -webkit-transform 175ms ease;

transition: transform 175ms ease;

}

更多信息請查看IT技術(shù)專欄

更多信息請查看網(wǎng)頁制作
易賢網(wǎng)手機(jī)網(wǎng)站地址:一款基于css3的動畫按鈕代碼教程
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國考·省考課程試聽報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 加入群交流 | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
咨詢QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)