Html
1 <Body>2 <!--Ul.layout>li*5>a[href=#]>i.icon -3 <!--Sublime Text shortcut spelling -4 <ulclass= "Layout">5 <Li><ahref="#"><Iclass= "icon">& #xe601;</I></a></Li>6 <Li><ahref="#"><Iclass= "icon">& #xe600;</I></a></Li>7 <Li><ahref="#"><Iclass= "icon">& #xe602;</I></a></Li>8 <Li><ahref="#"><Iclass= "icon">& #xe603;</I></a></Li>9 <Liclass= "Last-child"><ahref="#"><Iclass= "icon">& #xe604;</I></a></Li>Ten <Divclass= "Clear"></Div> One </ul> A </Body>
Css
1 <style>2 * {margin:0;padding:0;}3 Body{Background-color:#fc0;Padding-top:50px;}4 ul Li{List-style:None;}5 a{text-decoration:None;}6 . Clear{Clear:both;}7 . Layout{width:604px;margin:0 Auto;}8 . Layout Li{Display:Block;float: Left;Border-right:1px solid #930808; }9 . Layout Li.last-child{Border-right:None;}Ten . Layout Li a{Display:Block;width:120px;Height:120px;Line-height:120px;text-align:Center;Background-color:#f00;} One . Layout Li a i{Color:#fc0;} A . Layout Li a:hover i{Color:#fff;} - @font-face{ - font-family:"Icomoon"; the src:url (' Fonts/icomoon.eot?-9731bi '); - /*↑ Compatible IE9 compatibility mode opens IE8 and its following browsers can be displayed;*/ - /*↓ compatible IE9 can be displayed;*/ - src:URL ("Fonts/icomoon.eot. #iefix") format ("Embedded-opentype"), + URL ("Fonts/icomoon.woff") format ("Woff"), - URL ("Fonts/icomoon.ttf") format ("TrueType"), + URL ("fonts/icomoon.svg") format ("SVG"); A /*EOT {Microsoft develops fonts for embedding in Web pages, ie-specific fonts;} at **woff {Best format for Web fonts, recommended by the website;} - **ttf {A set of font standards, developed jointly by Microsoft and Apple, is the most common font in Mac OS and win OS;} - **svg {A format for SVG font rendering, which is an open standard graphic format developed by the Consortium;} - */ - Font-weight:Normal; - Font-style:Normal; in} - . Icon{ to font-family:"Icomoon"; + Font-style:Normal; - Font-weight:Normal; the font-size:90px; * -webkit-font-smoothing:antialiased; $ -moz-osx-font-smoothing:Grayscale;Panax Notoginseng /*anti-aliasing properties*/ -} the </style>
SHOW
Font icon Download website: Icomoon
@font-face to draw icons in font