字体图标,标媒体查询
发布于:2022-07-13 12:51:50
次阅读
<!DOCTYPE html><html lang="en"><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"> <link rel="stylesheet" href="./黑马/图片/京东/download/font_3459154_oua9l2daqpe/iconfont.css"> <title>Document</title></head><style> @media (min-width: 1200px) { html { font-size: 18px; } span{ color: red; } } @media (max-width: 720px) { html { font-size: 16px; } span{ color: blue; } } @media (max-width: 640px) { html { font-size: 14px; } span{ color: lightcoral; } } @media (max-width: 480px) { html { font-size: 12px; } span{ color: lightgreen; } } .box{ width:40rem; height:20rem; background-color: seagreen; }</style><body> <div class="box"> <span class="iconfont icon-huiyuanzhongxin"></span> </div></body></html>