html5 css3样式图标怎么做

html-css031

html5 css3样式图标怎么做,第1张

html5 css3样式图标制作方法:

1、html代码:

<div id="boxes">

<div id="boxShortcode">border-radius: 40px (shortcode)</div>

<div id="box1">border-top-right-radius: 40px (same on both axis)</div>

<div id="box2">border-top-right-radius: 20px 40px (x <y) </div>

<div id="box3">border-top-right-radius: 40px 20px (x >y) </div>

</div>

2、css样式代码:

#boxes div { margin-bottom: 20pxheight: 50pxpadding-left: 20px }

#boxShortcode {

background: cyan

border-radius: 40px

}

#box1 {

background: red

border-top-right-radius: 40px

}

#box2  {

background: yellow

border-top-right-radius: 20px 40px

}

#box3 {

background: lime

border-top-right-radius: 40px 20px

}

3、运行结果:

要使用css3的字体图标,要有以下步骤:

1、下载字体所需的文件;

2、在css文件中用@font-face引入该文件;

3、在@font-face中指定字体名

4、引用自定义的字体

你上面的问题看下是不是没有引用到字体(font-family);