css3實(shí)例教程 一款純css3實(shí)現(xiàn)的環(huán)形導(dǎo)航菜單
之前為大家介紹了好幾款導(dǎo)航菜單,今天要給大家?guī)?lái)一款純css3實(shí)現(xiàn)的環(huán)形導(dǎo)航菜單。該導(dǎo)航比較新鮮,列表圖標(biāo)位于中間,單擊列表圖標(biāo)的時(shí)候,各項(xiàng)分布于列表圖表的四周。形成一個(gè)環(huán)形。效果圖如下:
實(shí)現(xiàn)的代碼。
html代碼:
<h1>
Cool Open/Close menu in full CSS</h1>
<input type="checkbox" id="menu_opener_id" class="menu_opener">
<label for="menu_opener_id" class="menu_opener_label">
</label>
<div class="barre_hamburger">
</div>
<a href="#" class="link_one link_general"></a><a href="#" class="link_two link_general">
</a><a href="#" class="link_three link_general"></a><a href="#" class="link_four link_general">
</a></input>
</div>
css代碼:
[code]body
{
background: #34495e;
}
.container
{
width: 550px;
display: block;
margin: auto;
position: relative;
}
h1
{
text-align: center;
font-family: 'Roboto' , sans-serif;
font-weight: 400;
color: #f1c40f;
}
.menu_opener
{
display: none;
}
.menu_opener:checked ~ .link_one
{
top: 65px;
}
.menu_opener:checked ~ .link_two
{
left: 385px;
}
.menu_opener:checked ~ .link_three
{
top: 385px;
}
.menu_opener:checked ~ .link_four
{
left: 65px;
}
.menu_opener:checked ~ .barre_hamburger
{
opacity: 0;
}
.menu_opener:checked ~ .menu_opener_label:after
{
transform: rotate(45deg);
top: 70px;
}
.menu_opener:checked ~ .menu_opener_label:before
{
transform: rotate(-45deg);
top: 70px;
}
.menu_opener_label
{
background: #f1c40f;
width: 150px;
height: 150px;
display: block;
cursor: pointer;
border-radius: 50%;
position: absolute;
top: 200px;
left: 200px;
z-index: 10;
}
.menu_opener_label:after
{
position: absolute;
top: 50px;
left: 50px;
background: #000;
content: "";
width: 50px;
height: 10px;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.menu_opener_label:before
{
position: absolute;
top: 90px;
left: 50px;
background: #000;
content: "";
width: 50px;
height: 10px;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.barre_hamburger
{
width: 50px;
height: 10px;
position: absolute;
top: 270px;
left: 250px;
background: #000;
z-index: 20;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.link_general
{
width: 100px;
height: 100px;
display: block;
border-radius: 50%;
position: absolute;
top: 225px;
left: 225px;
background: #ecf0f1;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.link_one
{
background: url("home.png") #f1c40f no-repeat center center;
}
.link_two
{
background: url("mail.png") #f1c40f no-repeat center center;
}
.link_three
{
background: url("set.png") #f1c40f no-repeat center center;
}
.link_four
{
background: url("start.png") #f1c40f no-repeat center center;
} [code]
相關(guān)文章
- 這篇文章主要介紹了CSS3中的字體及相關(guān)屬性,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2025-06-12
CSS3實(shí)現(xiàn)的賬號(hào)密碼輸入框提示效果
本文詳細(xì)解析了CSS3中實(shí)現(xiàn)賬號(hào)密碼輸入框提示特效的原理和方法,包括HTML5的placeholder屬性與CSS3新特性如偽類選擇器、動(dòng)態(tài)效果和過渡動(dòng)畫的結(jié)合使用,感興趣的朋友跟隨小2025-05-14- CSS3的布局特性為前端開發(fā)者提供了無(wú)限可能,無(wú)論是Flexbox的一維布局還是Grid的二維布局,它們都能夠幫助開發(fā)者以更清晰、簡(jiǎn)潔的方式實(shí)現(xiàn)復(fù)雜的網(wǎng)頁(yè)布局,本文給大家介紹C2025-05-14
CSS3 Facebook-style Buttons 項(xiàng)目常見問題及最新解決方案
CSS3 Facebook-style Buttons 是一個(gè)開源項(xiàng)目,旨在通過簡(jiǎn)單的 CSS 代碼來(lái)重現(xiàn) Facebook 按鈕和工具欄的外觀,本文給大家介紹CSS3 Facebook-style Buttons 項(xiàng)目常見問題及2025-05-14使用animation.css庫(kù)快速實(shí)現(xiàn)CSS3旋轉(zhuǎn)動(dòng)畫效果
隨著Web技術(shù)的不斷發(fā)展,動(dòng)畫效果已經(jīng)成為了網(wǎng)頁(yè)設(shè)計(jì)中不可或缺的一部分,本文將深入探討animation.css的工作原理,如何使用以及其在實(shí)際項(xiàng)目中的應(yīng)用,感興趣的朋友一起看2025-05-14
CSS3 最強(qiáng)二維布局系統(tǒng)之Grid 網(wǎng)格布局
CS3的Grid網(wǎng)格布局是目前最強(qiáng)的二維布局系統(tǒng),可以同時(shí)對(duì)列和行進(jìn)行處理,將網(wǎng)頁(yè)劃分成一個(gè)個(gè)網(wǎng)格,可以任意組合不同的網(wǎng)格,做出各種各樣的布局,本文介紹CSS3 最強(qiáng)二維布局系2025-02-27- 本文介紹了如何使用CSS3的transform屬性和動(dòng)畫技巧實(shí)現(xiàn)波浪式圖片墻,通過設(shè)置圖片的垂直偏移量,并使用動(dòng)畫使其周期性地改變位置,可以創(chuàng)建出動(dòng)態(tài)且具有波浪效果的圖片墻,同2025-02-27

CSS3模擬實(shí)現(xiàn)一個(gè)雷達(dá)探測(cè)掃描動(dòng)畫特效(最新推薦)
文章介紹了如何使用CSS3實(shí)現(xiàn)一個(gè)雷達(dá)探測(cè)掃描的效果,包括夜色背景、蜘蛛網(wǎng)盤、掃描體的轉(zhuǎn)動(dòng)效果、尾巴陰影以及被掃描到的光點(diǎn),通過HTML和CSS的配合,實(shí)現(xiàn)了豐富的動(dòng)畫效果,2025-02-21- CSS3的Flexbox是一種強(qiáng)大的布局模式,通過設(shè)置display:flex可以輕松實(shí)現(xiàn)對(duì)齊、排列和分布網(wǎng)頁(yè)元素,它解決了傳統(tǒng)布局方法中的對(duì)齊、間距分配和自適應(yīng)布局等問題,接下來(lái)通過本2025-02-19

css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動(dòng)效果
本文給大家介紹css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動(dòng)效果,文章開頭給大家介紹了webkit-transform、animation、@keyframes這三個(gè)屬性,結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一2025-02-19




