DIV局部下拉滑动

1、创建CSS

    <style>
        div.scroll {
            height: 200px;
            width: 300px;
            overflow: auto;
            border: 1px solid #666;
            background-color: #ccc;
            padding: 8px;
        }
    </style>

2、html引用

<div class="scroll">
    <p>This is a scrolling are created with the CSS property overflow.</p>
    <p><span style="color: red;">This is red color</span> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
    <p>This is a normal paragraph.<span style="font-weight: bold; font-size: 22px;">This is big bold text</span>
    </p>
    <p>This scrolling are can contain normal html like <a href="index.php">link</a></p>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p>
</div>
阅读更多
个人分类: CSS div
上一篇解决UI里的驼峰问题
下一篇VUE基本使用
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭