带边框HTML CSS

时间:2016-05-10 11:32:35

标签: html css

我如何编写可滚动的div?完美的蓝色边框。

有没有办法对此进行编码?

像窗口中的窗口一样 - >两个滚动条

2 个答案:

答案 0 :(得分:0)

我不知道你的div的id,但我的是“盒子”

将此添加到您的代码中

#box {
    width: 1620 px;
    margin - right: auto;
    margin - top: 20 px;
    background - color: white;
    box - shadow: #254C58 1px 0px;
    border: # 3 C7D91 5 px double;
    padding: 10 px 10 px 10 px 10 px;
    overflow - y: scroll;
    max - height: 433 px;
}

答案 1 :(得分:0)

如果您想要水平,请将overflow-x:scroll添加到CSS中,当div扩展超出其定义的宽度时,它将变为可滚动。

反之,在相同的情况下,应添加overflow-y:scroll以允许垂直滚动。