Beautiful css3 icon navigation

高洛峰
Release: 2016-11-24 14:37:34
Original
1304 people have browsed it

This css3 icon navigation: mainly uses border-radius, transition, and font-face. First set a width and set overflow to hidden, then slide the mouse over and use transition to change its width to display the text information part. As for the three icons, the first two are made for font-face, and the last one is a picture.

html code:

<div id="header"><p>Go Back to Design Shack</p></div>
<div>
<div>
<a href="http://www.php.cn/">
Copy after login

css code:

* {margin: 0;padding: 0;}
#header {text-align: center;height: 30px;background: #444;}
#header a {color: #fff;font: 100 14px/30px Helvetica, Verdana, sans-serif;}
#header a:hover {color: #c2e9fa;}
.container {width: 90%;margin: 0 auto;}
/*Button*/.appstorebutton {height: 80px;width: 80px;margin: 50px;position: relative;overflow: hidden;float: left;
-webkit-border-radius: 40px;-moz-border-radius: 40px;border-radius: 40px;
-webkit-transition: width 1s ease;-moz-transition: width 1s ease;-o-transition: width 1s ease;-ms-transition: width 1s ease;transition: width 1s ease;}
.appstorebutton:hover {width: 275px;}
.appstorebutton a {color: white;text-decoration: none;}
/*Paragraph*/.appstorebutton p {font: 30px/1 Helvetica, Arial, sans-serif;text-align: center;color: white;margin: 4px 0 0 65px;width: 180px;}
.appstorebutton p small {font-size: 15px;}
.iphone small:before {content: "O";position: absolute;font: 70px/1 &#39;ModernPictogramsNormal&#39;, Helvetica, sans-serif;top: 10px;left: 20px;}
.ipad small:before {content: "Q";position: absolute;font: 70px/1 &#39;ModernPictogramsNormal&#39;, Helvetica, sans-serif;top: 10px;left: 13px;}
.mac small:before {content: url(imac.png);position: absolute;top: 22px;left: 18px;}
/*Button Colors*/.iphone {background: #7b7a7f;}
.ipad {background: #2ea9dc;}
.mac {background: #dc2e2e;}
/*Font-Face*/@font-face {font-family: &#39;ModernPictogramsNormal&#39;;src: url(&#39;modernpics-webfont.eot&#39;);src: url(&#39;modernpics-webfont.eot?#iefix&#39;) format(&#39;embedded-opentype&#39;),url(&#39;modernpics-webfont.woff&#39;) format(&#39;woff&#39;),url(&#39;modernpics-webfont.ttf&#39;) format(&#39;truetype&#39;),url(&#39;modernpics-webfont.svg#ModernPictogramsNormal&#39;) format(&#39;svg&#39;);font-weight: normal;font-style: normal;
}
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template