欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery div層的放大與縮小簡(jiǎn)單實(shí)現(xiàn)代碼

 更新時(shí)間:2013年03月28日 11:47:32   作者:  
div層的放大與縮小想必大家已不是那么陌生了吧,接下來為大家詳細(xì)介紹下使用jQuery實(shí)現(xiàn),感興趣的各位可以參考下哈,希望可以幫助到你
復(fù)制代碼 代碼如下:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.content
{
border: 1px solid #ccc;
width: 440px;
overflow: hidden;
margin: 10px;
}
</style>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
if ($('#content').height() > 400)
$('#content').height(400);
$('#bigger').toggle(function() {
$('#content').height($('#content').height() + 100);
$('#bigger').html('縮小');
}, function() {
$('#content').height($('#content').height() - 100);
$('#bigger').html('放大');
})
});
</script>
</head>
<body>
<div id="content" class="content">
內(nèi)容1<br />
內(nèi)容2<br />
內(nèi)容3<br />
內(nèi)容4<br />
內(nèi)容5<br />
內(nèi)容6<br />
內(nèi)容7<br />
內(nèi)容8<br />
內(nèi)容9<br />
內(nèi)容10<br />
內(nèi)容11<br />
內(nèi)容12<br />
內(nèi)容13<br />
內(nèi)容14<br />
內(nèi)容15<br />
內(nèi)容16<br />
內(nèi)容17<br />
內(nèi)容18<br />
內(nèi)容19<br />
內(nèi)容20<br />
內(nèi)容21<br />
內(nèi)容22<br />
內(nèi)容23<br />
內(nèi)容24<br />
內(nèi)容25<br />
</div>
<br />
<span id="bigger">放大</span>
</body>
</html>

相關(guān)文章

最新評(píng)論