【发布时间】:2011-11-28 16:08:23
【问题描述】:
附上复制代码。它(基本上)包含两个 div 元素:红色(固定)和黑色(带文本)。单击黑色 div 时,它被放大并且上面的文本保持清晰。然而,在 4 秒内,黑色 div 的 z-index 发生变化,黑色 div 变为 红色 div。 Boom! 这里的文字变得模糊(这是一个大问题)。
“效果”在 iPhone 3GS 上尤其明显,在 iPhone 4 上不太明显。
问题是:是否有解决方案/解决方法来调整每个代码,而不是调整红色 div 代码,以便黑色 div 上的文本保持清晰?
我在这里有任何问题/澄清请求。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script>
$(function() {
$("#main_div").bind("click", function() {
$("#wrapper").css({"z-index": -1});
$("#main_div").css({"-webkit-transform": "scale(1.4)"});
setTimeout(function() {
$("#wrapper").css({"z-index": 2});
}, 4000);
return true;
});
});
</script>
<title>Title</title>
</head>
<body>
<div id="wrapper" style="position: absolute; z-index: 2; visibility: visible; height: 598px; top: 150px; width: 972px; left: 20px;">
<div style="position: absolute; width: 972px; height: 598px; ">
<div id="main_div" style="position: relative; height: 375px; width: 610px; background-color:rgb(2,2,2); -webkit-transform-origin-x: 0px; -webkit-transform-origin-y: 0px;">
<div style="position: relative; padding-top: 26px; padding-right: 10px; padding-bottom: 26px; padding-left: 10px; font-size: 10px; ">
<div style="display: inline; font: normal normal normal 14px/normal arial; color: rgb(150, 150, 150); ">
<span>Here is some TEXT</span>
</div>
</div>
</div>
</div>
</div>
<div style="position: fixed; visibility: visible; height: 598px; top: 150px; width: 972px; left: 20px;">
<div style="position:fixed; bottom:0; right:0; width:70%; height:30%; background-color: red;"></div>
</div>
</body></html>
【问题讨论】:
标签: javascript iphone css webkit mobile-safari