CSS3制作蘋(píng)果風(fēng)格鍵盤(pán)特效
發(fā)布時(shí)間:2015-02-26 10:03:18 作者:佚名
我要評(píng)論

本文給大家分享的是一則使用CSS3制作的仿蘋(píng)果風(fēng)格的鍵盤(pán)特效,效果十分不錯(cuò),這里推薦給大家。
效果預(yù)覽:
html標(biāo)簽:
復(fù)制代碼
代碼如下:<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS3 KeyBoard</title>
<link rel="stylesheet" href="font.css" type="text/css" >
<link rel="stylesheet" href="style.css" type="text/css" >
</head>
<body>
<ul>
<li>Q</li>
<li>W</li>
<li>E</li>
<li>R</li>
<li>T</li>
<li>Y</li>
<li>U</li>
<li>I</li>
<li>O</li>
<li>P</li>
<li class="icon">?</li>
<li>A</li>
<li>S</li>
<li>D</li>
<li>F</li>
<li>G</li>
<li>H</li>
<li>J</li>
<li>K</li>
<li>L</li>
<li>return</li>
<li class="icon">?</li>
<li>Z</li>
<li>X</li>
<li>C</li>
<li>V</li>
<li>B</li>
<li>N</li>
<li>M</li>
<li><span>!</span><span>,</span></li>
<li><span>?</span><span>.</span></li>
<li class="icon">?</li>
<li>.?123</li>
<li></li>
<li>.?123</li>
<li class="icon">?</li>
</ul>
</body>
</html>
CSS代碼:
復(fù)制代碼
代碼如下:@font-face {
font-family: 'icomoon';
src:url('http://upimage-img.stor.sinaapp.com/icomoon.eot');
src:url('http://upimage-img.stor.sinaapp.com/icomoon.eot?#iefix') format('embedded-opentype'),
url('http://upimage-img.stor.sinaapp.com/icomoon.woff') format('woff'),
url('http://upimage-img.stor.sinaapp.com/icomoon.ttf') format('truetype'),
url('http://upimage-img.stor.sinaapp.com/icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background-color: #000;
}
ul, li {
list-style: none;
margin: 0;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
ul {
width: 704px;
background: linear-gradient(60deg, rgba(158,180,185,1), rgba(222,157,193,1) 50%, rgba(169,156,173,1) 100%);
padding-left: 8px;
border-radius: 5px;
padding-top: 10px;
}
ul::after {
content: "";
display: table;
clear: both;
}
li {
font-family: "Vrinda";
width: 54px;
height: 50px;
line-height: 50px;
background-color: rgba(255,255,255,.9);
border-radius: 5px;
float: left;
text-align: center;
font-size: 24px;
vertical-align: text-top;
margin-right: 10px;
margin-bottom: 10px;
box-shadow: 0 1px 0 rgba(0,0,0,.5);
cursor: pointer;
position: relative;
}
li:active {
box-shadow: inset 0 1px 0 rgba(0,0,0,.5);
top:1px;
}
.icon {
font-family: "icomoon";
}
li:nth-child(11), li:nth-child(21), li:nth-child(22),
li:nth-child(32), li:nth-child(33), li:nth-child(35), li:nth-child(36) {
background: rgba(188,188,188,.5);
font-size: 20px;
}
li:nth-child(12) {
margin-left: 20px;
}
li:nth-child(21) {
width: 98px;
}
li:nth-child(n+22) {
width: 52px;
}
li:nth-child(32) {
width: 74px;
}
li:nth-child(33) {
width: 176px;
}
li:nth-child(34) {
width: 362px;
}
li:nth-child(35) {
width: 74px;
}
li:nth-child(31), li:nth-child(30) {
box-sizing: border-box;
padding-top: 14px;
}
li:nth-child(31) span, li:nth-child(30) span {
display: block;
line-height: 0.5;
}
相關(guān)文章
Css3臨摹蘋(píng)果Mac系統(tǒng)界面 請(qǐng)用谷歌瀏覽器查看
CSS3另類運(yùn)用_臨摹蘋(píng)果Mac系統(tǒng)界面,不過(guò)兼容改方面還不完善,暫僅在chrome或safari5中有完整效果,IE系列瀏覽器可能產(chǎn)生錯(cuò)誤。2012-05-08基于CSS3+JavaScript的仿safari仿蘋(píng)果瀏覽器歷史記錄效果代碼
CSS3+JavaScript仿safari仿蘋(píng)果瀏覽器歷史記錄效果,主要用到了HTML5 + CSS3 + JS,大量借助了css3自帶的一些動(dòng)畫(huà)去實(shí)現(xiàn)的。然后再配合上一些js,就實(shí)現(xiàn)了本效果。2012-08-24純CSS3實(shí)現(xiàn)的Apple.com導(dǎo)航菜單(蘋(píng)果風(fēng)格)
蘋(píng)果官網(wǎng)換了一個(gè)新的導(dǎo)航菜單。這個(gè)新的導(dǎo)航菜單比之前的顏色深很多,但是看起來(lái)也是非常地酷。關(guān)于新的導(dǎo)航菜單我注意到一件事,這些菜單的按鈕不是用圖片做2012-09-14jquery+css3模仿蘋(píng)果風(fēng)格的3D質(zhì)感登錄界面
通過(guò)CSS和jQuery組合生成的3D質(zhì)感的登錄窗口效果,類似iphone登錄窗口2013-05-02CSS3實(shí)現(xiàn)的手風(fēng)琴菜單效果(仿蘋(píng)果style)
CSS3實(shí)現(xiàn)的手風(fēng)琴菜單效果,模仿蘋(píng)果style,當(dāng)點(diǎn)擊橫條時(shí)會(huì)以下拉的方式顯示菜單內(nèi)容2013-06-03CSS3模仿蘋(píng)果iphone的搜索框聚焦變長(zhǎng)效果
幾乎和蘋(píng)果iphpne自帶的搜索框一樣,搜索框獲取焦點(diǎn)時(shí)搜索框會(huì)變長(zhǎng)2013-09-18CSS3實(shí)現(xiàn)3D蘋(píng)果筆記本翻轉(zhuǎn)動(dòng)畫(huà)效果源碼
這是一款超炫的CSS3實(shí)現(xiàn)3D動(dòng)畫(huà)翻轉(zhuǎn)效果源碼,并且?guī)в?D視覺(jué)效果,可以360度旋轉(zhuǎn)的macbook air。在這款CSS3 3D動(dòng)畫(huà)的筆記本底部還有一個(gè)逼真的投影,可以跟隨圖片一起轉(zhuǎn)動(dòng)2014-06-16