【CSS】12-图标的使用

12-图标的使用

1.svg图标

svg:
    矢量图:不会失真
    在阿里矢量图库下载:https://www.iconfont.cn/

实例:

<style type="text/css">
	
	svg:hover path:nth-of-type(1) {
		fill: gray;
	}
	svg:hover path:nth-of-type(1)~path {
		fill: white;
	}
	
</style>
</head>
<body>

    <svg t="1581659683818" class="icon" 
    viewBox="0 0 1024 1024" version="1.1" 
    xmlns="http://www.w3.org/2000/svg" p-id="2899" 
    width="200" height="200">
    	<path d="M512 929.959184c-230.4 0-417.959184-187.559184-417.959184-417.959184s187.559184-417.959184 417.959184-417.959184 417.959184 187.559184 417.959184 417.959184-187.559184 417.959184-417.959184 417.959184z" fill="red" p-id="2900"></path>
    	<path d="M444.081633 689.632653c-5.22449 0-10.44898-2.089796-14.628572-6.269388-8.359184-8.359184-8.359184-21.420408 0-29.779592l156.734694-156.734693c8.359184-8.359184 21.420408-8.359184 29.779592 0 8.359184 8.359184 8.359184 21.420408 0 29.779591l-156.734694 156.734694c-4.702041 4.179592-9.926531 6.269388-15.15102 6.269388z" fill="green" p-id="2901"></path>
    	<path d="M600.816327 532.897959c-5.22449 0-10.44898-2.089796-14.628572-6.269388l-156.734694-156.734693c-8.359184-8.359184-8.359184-21.420408 0-29.779592 8.359184-8.359184 21.420408-8.359184 29.779592 0l156.734694 156.734694c8.359184 8.359184 8.359184 21.420408 0 29.779591-4.702041 4.179592-9.926531 6.269388-15.15102 6.269388z" fill="blue" p-id="2902"></path>
    </svg>

<img src="img/箭头.svg" >

</body>

2.icomoon的使用

官网:https://icomoon.io/

实例:

<head>
	<meta charset="utf-8">
	<title>icomoon的使用</title>
	<link rel="stylesheet" type="text/css" href="css/font-style.css"/>
</head>
<body>
	<span class="icon-uniE900">
		<span class="path1"></span><span class="path2"></span><span class="path3"></span>
	</span>
</body>

3.FontAwesome框架

FontAwesome:
    优秀的iconfont框架
国内cdn地址
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">

实例:

<head>
	<meta charset="utf-8">
	<title>FontAwesome框架</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
</head>
<body>
	<i class="fa fa-car" style="color: red;"></i>
	<i class="fa fa-qq"></i>
	<i class="fa fa-wechat"></i>
	<i class="fa fa-weibo"></i>
	<i class="fa fa-"></i>
</body>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

JeffHan^_^

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值