CSS浮动按钮跳出包装部门 [英] CSS floated button jumps out of the wrapper division
本文介绍了CSS浮动按钮跳出包装部门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
浮动div面临的问题是我写了这段代码:
但是每当我尝试添加类时,右键都会使它浮动到右侧,按钮它跳出包装div作为
如何保持左侧浮动按钮位于包装div内,而不是像第二个代码那样位于包装div之外。
解决方案
将。
JSFiddle: http://jsfiddle.net/9Ecq2/8/
The problem i am facing with floated div is i have written this piece of code:
but whenever i try add the class ;right' ,that makes it float to the right, to the button it jumps out of the wrapper div as
How can i keep the left floated button inside the wrapper div rather then it being out of the wrapper div as in case of the second code.
解决方案
Add overflow: hidden
to the #buttonWrapper
.
JSFiddle: http://jsfiddle.net/9Ecq2/8/
这篇关于CSS浮动按钮跳出包装部门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文