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

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

作者: calvinbj | 来源:发表于2019-02-20 13:19 被阅读0次

按钮的自动换行

按钮的最大宽度就是容器的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>

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/xomfyqtx.html