【发布时间】:2010-04-15 23:34:19
【问题描述】:
你能告诉我完整的 html 代码,其中有一些矩形,“height=75% of my screen”和“widtht=4/3 of height”。所以,它应该是 3:4 reсtangle,高度取决于我的屏幕高度,但宽度不取决于我的屏幕宽度。仅屏幕高度。
我以为我了解以前的时间,但事实并非如此。
我有这个:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
});
</script>
而且我不知道如何处理宽度。
【问题讨论】:
-
You've asked similar question before? 如果您以某种方式丢失了问题和答案,您可以在您的个人资料页面中找回它们,您可以通过单击您的姓名以链接形式出现的任何地方(如 TRAVA)来访问,例如在顶部栏中:)
-
我以为我明白了,但事实并非如此(
-
您好! “给我完整的代码”不太可能给你任何有意义的回应,这是一个“给我提示”网站,而不是“为我做我的工作”网站。
-
对不起。给我提示,用什么来代替“width =”以获得结果? $(document).ready(function(){ $(".example7").colorbox({width:"80%", height:"80%", iframe:true}); });
-
@TRAVA:我会说类似
width:screen.height,height:screen.height*0.75。
标签: javascript jquery html css