jQuery ui滑块调整div中的所有元素(jQuery ui slider to resize all elements within a div)

编程入门 行业动态 更新时间:2024-10-12 12:32:29
jQuery ui滑块调整div中的所有元素(jQuery ui slider to resize all elements within a div)

真的在挣扎吗? 我对Jquery很新,并试图绊倒我的方式......

这是我到目前为止http://jsfiddle.net/VUY4p/

我无法弄清楚如何让它工作,我需要所有的div与瓶子图像一起缩放,也要居中,所以当主滑块一直到右边时,视图只是标签区域的大约300px宽的文本,然后当滑块向左移动时,整个瓶子都可见,其他一切都随之缩小,包括与近距离视图相同比例的文本。

我希望这是有道理的,我希望有人可以看看,看错了什么?

当瓶子图像增加时,当字体改变时,文本也会发生奇怪的事情? 它跳到左边?

really struggling with this ?? I am very new to Jquery and trying to stumble my way through it...

here is what I have so far http://jsfiddle.net/VUY4p/

I cant figure out how to get it to work, I need all the divs to scale with the bottle image and also to be centred, so when the main slider is all the way to the right the view is of just the label area with the text at around 300px wide and then when moving slider to the left the entire bottle is visible and everything else shrinks with it, including the text in the same proportions as the close up view.

i hope this makes sense and I hope someone can take a look and see whats wrong?

Also something strange happens to the text when the font is changed as the bottle image is increased?? it jumps to the left??

最满意答案

这可能会或可能不会帮助你,但我认为重做图像区域可能会更好。 也许其中一些会对你有所帮助。 我认为在答案中发布的代码太多了。

演示: http : //jsfiddle.net/lucuma/ggC8s/6/

This may or may not help you, but I thought it might be better to redo the image area. Perhaps some of it will help you. I think it is too much code to post in the answer.

Demo: http://jsfiddle.net/lucuma/ggC8s/6/

更多推荐

本文发布于:2023-08-05 21:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437932.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:滑块   元素   jQuery   ui   div

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!