Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:效果不错,没什么问题,继续加油
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>字体图标</title>
<!-- Class -->
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3731673_a1qsilac6p.css">
<style>
.iconfont.class{
font-size: x-large;
color: green;
text-shadow: 1px 1px 1px #888;
}
.iconfont.class:hover{
color: red;
cursor: pointer;
transition: color 0.6s linear;
}
</style>
</head>
<body>
<!-- 1.class -->
<div class="iconfont class">
<div class="icon-zhuce"></div>
<div class="icon-denglu"></div>
</div>
<hr />
</body>
</html>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>媒体查询</title>
</head>
<body>
<!-- 1.媒体查询的原理 -->
<!-- 媒体: 屏幕, 手机, 打印机
查询: 查询媒体宽度来确定元素展示方式
布局不能在一个无限空间进行,宽,高必须限定一个
默认限定宽高,而高度随内容不断增长 -->
<button class="btn small">查询1</button>
<button class="btn middle">查询2</button>
<button class="btn large">查询3</button>
<style>
html{
/* 1rem=10px */
font-size: 10px;
}
.btn{
background-color: green;
color: red;
border: none;
outline: none;
}
.btn:hover{
cursor: pointer;
opacity: 0.5;
transition: color 0.3s linear;
}
/* 查询1 */
.btn.small{
font-size: 1.4rem;
}
/* 查询2 */
.btn.middle{
font-size: 1.8rem;
}
/* 查询3 */
.btn.large{
font-size: 2.2rem;
}
/* 2.媒体查询的顺序 */
/* 移动端: 从小往大写 */
/* PC端: 反过来写,从大向下写 */
/* < 375px , 1rem = 12px */
/* 小于375px,意思就是不大于375px */
@media (max-width: 374px) {
html {
font-size: 12px;
}
}
/* 375px - 415px : 1rem = 14px */
@media (min-width: 375px) and (max-width: 414px) {
html {
font-size: 14px;
}
}
/* > 415px : 1rem = 16px */
@media (min-width: 415px) {
html {
font-size: 16px;
}
}
</style>
</body>
</html>