您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

为不同尺寸设备设置不同CSS样式规则的媒体查询

2024/3/1 0:19:29发布19次查看
为不同的css样式规则设置媒体查询,您可以尝试运行以下代码 −
示例实时演示
<html> <head> <style> body { background-color: lightpink; } @media screen and (max-width: 420px) { body { background-color: lightblue; } } </style> </head> <body> <p>if screen size is less than 420px, then it will show lightblue color, or else it will show light pink color</p> </body></html>
以上就是为不同尺寸设备设置不同css样式规则的媒体查询的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product