用jQuery显示div。 css问题 [英] Show div with jQuery. css question

查看:175
本文介绍了用jQuery显示div。 css问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个div与 display:inline-block 。在每个div我有div display:none 当我试图显示隐藏div与 $('#div-id')。show )最近的divs'jump around'
我应该改变什么?我喜欢看div下的div只是绘制和左或右div不改变他的地方。
例如,我的问题的两个div (隐藏div在文本框中显示onchange)

I have three divs with display: inline-block. In every div i have div with display: none when im trying to show hiding div with $('#div-id').show(1000) nearest divs 'jump around' What should i change? I do like to see div under div just draw and the left or right div doesn't change his place. For example two divs with my problem there (hide div shows up onchange in the textbox)

推荐答案

http ://jsfiddle.net/WZCJu/13/

我添加了这个CSS:

#amount-div, #specific-div {
    width: 300px;
    vertical-align: top
}

c> width ,您可能会更喜欢:

Version without the width, you may like it better:

http://jsfiddle.net/WZCJu/15/

这篇关于用jQuery显示div。 css问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆