CSS foundation (xv) - Display the style of the line so that the tag label with block-level property display: inline-block


Essays and records to facilitate their access to fellow travelers, it is best to learn HTML learning CSS.

#------------------------------------------------I ------------------------------------------- dividing line is a shame

If you want the tag line has a block-level tag, then you can use the Run the display: inline-block ; let the label and have inlne also have block attributes

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input系列</title>
</head>
<body>
    <span style="background-color:red; display:inline-block; width:50px;height:50px;">span</span>
</body>
</html>

effect:

Use of the display : inline-Block ; succeeding label may also be provided within the height, width, etc.

 

Guess you like

Origin www.cnblogs.com/lirongyang/p/11303526.html