Javascript 使用jquery缩放div

Javascript 使用jquery缩放div,javascript,jquery,Javascript,Jquery,我想通过滚动缩放一个div和其中的内容,我看到了这个小提琴并试图复制它,但它不起作用(没有缩放) 这里是我的HTML: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="zoom.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="zoom.js"><

我想通过滚动缩放一个div和其中的内容,我看到了这个小提琴并试图复制它,但它不起作用(没有缩放)

这里是我的HTML:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="zoom.css"  type="text/css" rel="stylesheet" />
        <script type="text/javascript" src="zoom.js"></script>
<script type="text/javascript" src="jquery/jquery.mousewheel.js"></script>
<script type="text/javascript" src="jquery/jquery-1.8.3.min.js"></script>
</head>

<body>
<h1>Zoom</h1>
<div id="zoomContent">
    <p class="col1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
    <p class="col2">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</body>
还有我的CSS:

#zoomContent{
        width: 600px;
    height: 300px;
    font-size: 16px;
    overflow: scroll;
    border: 5px solid #333;
}

.col1,
.col2{
        width: 10em;
    padding: 0.3em;
    background: red;
    float: left;
}

.col2{
        background: green;
}
我忘了什么


谢谢

您的代码正在使用jQuery插件,为了让它们正常工作,插件必须包含在核心jQuery框架之后

以下两行应该是相反的

<script type="text/javascript" src="jquery/jquery.mousewheel.js"></script>
<script type="text/javascript" src="jquery/jquery-1.8.3.min.js"></script>

因为它们在你链接的小提琴中

<script type="text/javascript" src="jquery/jquery.mousewheel.js"></script>
<script type="text/javascript" src="jquery/jquery-1.8.3.min.js"></script>