我正在完成我的网站,除了一件小事外,一切都完美无缺。当我使用我的 iPhone 时,纵向模式正是我想要的,问题是横向模式。我好像已经设计过了,但我不喜欢最终版本...所以我需要插入另一行代码,但我不知道该怎么做...
这是我拥有的现在
<meta name="viewport" content="width=device-width,initial-scale=1">
现在我需要一个只为风景模式。我希望这个 ^ 一直工作,除了横向模式。在横向模式下,我想要这个:<meta name="viewport" content="height=device-height,initial-scale=1">
我的问题是我怎么说这只能在横向模式下工作?
谢谢
我正在尝试使用Jquery向我的网站添加过渡效果.一切都在工作,但突然之间网站开始闪烁一次,然后淡出效果......我添加了一个display:none
,它就解决了.但是,如果访问者禁用了JavaScript,他们将无法查看该网站.我已经将它添加为脚本,但它不起作用......任何想法?这是我的淡入淡出代码:
<!--transition-->
<script type="text/javascript">
$(document).ready(function() {
$("body").css("display", "none");
$("img").css("display", "none");
$("body").fadeIn(2000);
$("img").fadeIn(2000);
$("a.link").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(1000, redirectPage);
$("img").fadeOut(1000, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
});
</script>
Run Code Online (Sandbox Code Playgroud)