首页 > 编程 > JavaScript > 正文

根据分辩率调用不同的CSS.

2019-11-21 02:22:35
字体:
来源:转载
供稿:网友
复制代码 代码如下:

<head>
<script language=javascript> 
<!--
if (screen.width == 800)
{
document.write('<link rel=stylesheet type="text/css" href="css800.css">')
}
else {document.write('<link rel=stylesheet type="text/css" href="css1024.css">')}
//-->
</script>
</head>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表