css3中的字体图标 iconfont的问题

html-css014

css3中的字体图标 iconfont的问题,第1张

去bootcss网站上下载一个看一下就明白了,让别人讲你自己也要了解下。

.icon-cart:before {

content: "\e623"

}

.icon-cart:after {

content: "\e623"

}

都可以

\e623 就是对应的你要插入的那个字体图标的编号

[class^="ico_task"]{

background:#F00

width:100px

height:100px

}

[abc^="def"]选择 abc 属性值以 "def" 开头的所有元素

[abc$="def"]选择 abc 属性值以 "def" 结尾的所有元素

[abc*="def"]选择 abc 属性值中包含子串 "def" 的所有元素

你可以参考:http://www.w3school.com.cn/css/css_selector_attribute.asp

用CSS背景和定义。

<div class="logo" title="网站名称"><a href="/"><h1>网站名称</h1></a></div>

<style>

.logo{width:200pxheight:80pxbackground:url(/images/logo.png) no-repeat}

.logo h1{text-indent:-9999pxwidth:200pxheight:80pxoverflow:hidden}

</style>

CSS(层叠样式表)级联样式表是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。