css如何制作下载小图标
1、打开html开发软件,在html开发工具中新建一个html代码页面。

2、在html代码页面上创建一个<div>标签,然后给这个<div>添加一个class类(icon-down)。

3、使用css制作一条竖线。在<title>标签后面新建一个<style>,然后在<style>标签里面创建一条竖线。
css样式代码:
<style>
.icon-down{
width:2px;
height: 50px;
border:none;
background-color: #ccc;
margin: 20px auto;
position: relative;
}
</style>

4、保存html代码页面,然后使用浏览器查看,浏览器页面上会显示一条竖线。

5、回到html代码页面,使用css伪类after设置一个向下的箭头符号。
css样式:
.icon-down::after{
content: "";
width:30px;
height: 30px;
border-right: 3px solid #ccc;
border-bottom: 3px solid #ccc;
transform: rotate(45deg);
position: absolute;
bottom: 3px;
left: -16px;
}

6、保存html代码页面,使用浏览器打开,即可看到浏览器上显示一个下载的小图标。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:160
阅读量:150
阅读量:102
阅读量:46
阅读量:173