
批改狀態(tài):合格
老師批語:完成的很好,繼續(xù)加油
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1025作業(yè)</title>
<!-- 作業(yè)內(nèi)容:-->
<!-- 1. 實(shí)例演示字體的圖標(biāo)的使用,重點(diǎn)在class方式 -->
<!-- 2. 實(shí)例演示媒體查詢?cè)?并描述媒體查詢的順序-->
</head>
<link rel="stylesheet" href="../img/iconfont/iconfont.css">
<style>
.icon-shouye{
color: green;
font-size: 21px;
}
.icon-zhuce:hover{
color: blue;
}
</style>
<body>
<h3>1. 實(shí)例演示字體的圖標(biāo)的使用,重點(diǎn)在class方式</h3>
<!--注意:圖標(biāo)采用下載本地引用-->
<!--字體圖標(biāo)的字體代碼需要放到clas類里面-->
<i class="iconfont icon-shouye">首頁圖標(biāo)</i>
<span><i class="iconfont icon-zhuce">注冊(cè)圖標(biāo)</i> </span>
<h3>2. 實(shí)例演示媒體查詢?cè)?并描述媒體查詢的順序</h3>
<pre>媒體查詢字面含義:
媒體: 屏幕, 手機(jī), 打印機(jī)
查詢: 查詢媒體寬度來確定元素展示方式</pre>
<div class="iup1"><label>1 <input type="text" placeholder="框1:設(shè)置字體大小56px"></label></div>
<div class="iup2"><label>2 <input type="text" placeholder="框2:設(shè)置紅色字體"></label></div>
<div class="iup3"><label>3 <input type="text "placeholder="框3:設(shè)置邊框線藍(lán)色"></label></div>
<style>
/*默認(rèn)字體大小1rem =10px*/
html{font-size: 10px}
.iup1>label{font-size: 1rem}
/*如果設(shè)備尺寸小于于400px,設(shè)置框1字體大小為56px,框2的字體顏色為紅色,框3的邊框線藍(lán)色*/
@media (max-width: 400px) {
html{ font-size:10px;}
.iup1>label{font-size:4rem }
.iup2{color: red}
.iup3{border: 1px solid blue}
}
/*如果設(shè)備尺寸在450px~475pxpx之間,框1背景顏色修改為綠色,body背景顏色改為#d9dbda,html根字號(hào)改為15px */
@media (min-width: 450px) and (max-width: 475px){
.iup1{background-color: green}
body {background-color: #d9dbda}
html {font-size: 15px}
}
</style>
</body>
</html>
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)