实战笔记四(按钮元素“包裹性”示意实例页面)

2019-02-20  本文已影响0人  calvinbj

按钮的自动换行

按钮的最大宽度就是容器的240元素。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>

    .box {
        width: 240px;
        margin: 20px auto;
    }

    </style>
</head>
<body>
    <div class="box">
        <button>按钮文字越多宽度越宽(包裹,内部尺寸特性),但不会超过容器宽度(自适应性)</button>
    </div>
</body>
</html>
上一篇 下一篇

猜你喜欢

热点阅读