我目前正在设计一个单页的网站,我希望一些网页有一列有文字,另一列有图片。然而,图像应该“补”了,我用这个代码的浏览器窗口大小:如何在代码中实现此设计?
<script type="text/javascript">
$(document).ready(function() {
$(".screenheight").each(function(){
var $this = $(this);
$this.css({'min-height':($(window).height())+'px'});
$(window).resize(function(){
$this.css({'min-height':($(window).height())+'px'});
});
});
});
</script>
这工作,但我不能找出如何仍与文本对齐列,到菜单(像页with width: 960px
和margin: 0 auto;
)
这是从设计我试图实现图像: imgur link
我希望有人能帮助我。
我不明白它到底是什么,你所需要的,或者是什么的问题。你能提供链接到完整的示例页面吗? – developer82 2014-09-23 15:01:59
你可以提供你现在的html和css吗?当图像不完全适合空间时会发生什么,你想裁剪它的一部分吗? – isogram 2014-09-23 15:02:05
使用Bootstrap,你可以定义2列并填充它们吗? – 2014-09-23 15:06:12