简体   繁体   English

CSS滑块中的文本溢出

[英]text overflowing in css slider

I am facing problem in designing a review/feedback box. 我在设计审阅/反馈框时遇到问题。

Css- CSS-

.wellwhite
{
    margin: 0 auto;
    width: 75%;
    padding: 24px;
    margin-top: 35px;
    background-color: #fff;
    border: 2px solid #fff;
    min-width: 269px;
    position: relative;
}
.well-review
{
    padding: 24px;
    border: 1px solid #efefef;
    background: #efefef;
    box-shadow: 1px 1px 1px 1px #ccc;
    position:relative;
}
.slide-feedback
{
    position:relative;
}
.slide-feedback a
{
    position:absolute;

}

Script 脚本

<script type="text/javascript">

        $(function () {
            $('.slide-feedback a').hide();
            $('.slide-feedback a:first-child').show();
            setInterval(function () {
                $('.slide-feedback a:first-child').fadeOut(function () {
                    $(this).appendTo('.slide-feedback');
                }).next().show();
            }, 3000);


        });

</script>

Fiddle 小提琴

Problem seemed so simple to me but couldn't get a solution yet. 问题对我来说似乎很简单,但还无法解决。 I get content overflows from the boundary class. 我从边界类中获得内容溢出。

Note- 注意-

I don't want to use overflow:hidden because review would be varying according to user's feedback. 我不想使用overflow:hidden因为审查会根据用户的反馈而有所不同。

The active .slide-feedback a is given position: absolute; 有效的.slide-feedback a position: absolute; in the CSS... which causes it to overflow rather than expand the parent div. 在CSS中...导致它溢出而不是扩展父div。

Solution: http://jsfiddle.net/9hE5Y/4/ 解决方案: http : //jsfiddle.net/9hE5Y/4/

.slide-feedback a
{
    position:static;

}

Try using overflow:hidden; 尝试使用overflow:hidden; on the box? 在盒子上? Overflow can be set to auto, scroll or hidden. 溢出可以设置为自动,滚动或隐藏。 Can also use overflow-y for just vertical overflow control. 也可以将overflow-y用于垂直溢出控制。

Remove position: absolute; 移除position: absolute; on .slide-feedback a .slide-feedback a

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM