<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
<div class="resizable">
Lorem <br/>
ipsum<br/>
dolor<br/>
sit<br/>
amet<br/>
Consectetuer<br/>
Lorem<br/>
magna<br/>
mi<br/>
wisi
</div>
</body>
</html>
$(document).ready(function() {
$(".resizable")
.wrap('<div/>')
.css({'overflow':'hidden'})
.parent()
.css({'display':'inline-block',
'overflow':'hidden',
'height':function(){return $('.resizable',this).height();},
'width': function(){return $('.resizable',this).width();},
'paddingBottom':'12px',
'paddingRight':'12px'
}).resizable()
.find('.resizable')
.css({overflow:'auto',
width:'100%',
height:'100%'});
});
在此调试:
http://jsfiddle.net/Ka7P2/2/
本文介绍如何使用HTML、CSS、JavaScript等技术,通过`.resizable`类实现可调整大小的div布局,并利用jQuery插件进行响应式设计,以适应不同设备屏幕尺寸。

被折叠的 条评论
为什么被折叠?



