day 4 learn html
2019/11/14
学习资料来自老男孩与尚学堂
1. CSS拾遗之图标
图标有三种制作方法:
- 图片
- css(小箭头用CSS搞定)
- 自己画font(fontawsome插件)
fontawsome插件下载之后,解压,新版的与老版不一样。
2. html文件的目录结构
xxx project
- app
- s1.html
- s2.html
- css
- commons.css
- script
- commons.js
- plugin
- fontawsome
- bootstrap
- ...
3. CSS拾遗之a包含标签
image默认是有个边框的,在chrom中没事,但是在IE Browser里面就会把边框显示出来,所以要将image标签的边框设为0.
<hedad>
<style>
img{
border: 0;
}
/* IE浏览器会产生边框,所以要将边框设为0 */
</style>
</head>
<body>
<a href="wwww.baidu.com">lanxing</a>
<a href="www.baidu.com">
<img sytle="height:300px;400px" src="wallpaper1.jpg" alt="lanxing">
<a>
<body>
4. CSS拾遗之箭头画法
<style>
.up {
border-top: 30px solid green;
border-right: 30px solid transparent;
border-bottom: 30px solid transparent;
border-left: 30px solid transparent;
display: inline-block;
}
.down {
border-top: 30px solid transparent;
border-right: 30px solid transparent;
border-bottom: 30px solid red;
border-left: 30px solid transparent;
display: inline-block;
}
.c1 {
border: 30px solid transparent;
border-top: 30px solid green;
display: inline-block;
margin-top: 40px;
}
.c1:hover {
border: 30px solid transparent;
border-bottom: 30px solid green;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="up"></div>
<div class="down"></div>
<div style="height: 100px; background-color: red;">
<div class="c1"></div>
</div>
</body>