jQuery scale div内容(嵌套div)
16lz
2021-01-22
How can I get the blue box to scale with the red one? (using jQuery-UI)
如何将蓝色框与红色框一起缩放? (使用jQuery-UI)
http://jsfiddle.net/Y54EB/1/
http://jsfiddle.net/Y54EB/1/
This is the basic code, CSS:
这是基本代码,CSS:
#outer {
position:relative;
height:100px;
width:150px;
z-index:1;
background:#F00;
}
#nested {
position:absolute;
left:50px; top:20px;
width:50px; height:20px;
z-index:2;
background:#00F;
cursor:pointer;
}
And HTML:
和HTML:
<div id="outer">
<div id="nested" onclick="$('#outer').effect('scale', {scale:'content',percent:50}, 1000);" />
</div>
4 个解决方案
#1
3
I realize this is old, but if I understand you correctly, I was trying to achieve the same thing and came across this jQuery plugin that does the job:
我意识到这是旧的,但如果我理解正确,我试图实现同样的事情,并遇到了这个jQuery插件,它完成了这项工作:
https://github.com/heygrady/transform/wiki
https://github.com/heygrady/transform/wiki
更多相关文章
- Emmet插件快速编写html小技巧
- html提示框插件
- Wordpress主题调试:插件侧边栏导致原始侧边栏不显示
- Ajax上传插件。handleError未找到
- 使用AJAX与拖放jQuery插件
- weiphp插件开发注意
- 如何将Composer中的CakePHP插件安装到app / Plugin中
- jQuery通过igorescobar jQuery掩码插件验证电话号码输入。
- 记12306货运系统“抢订空车”插件的编写--订车流程梳理