在下面的代码中,我尝试以strong
某种方式格式化元素,即它在自身周围占据额外的空间 (1em)。左边和右边的文本被 strong-element 替换,但底部和顶部的额外空间不会替换文本。我该如何解决这个问题?
<html>
<head>
<title>CSS test</title>
<style type="text/css">
h1 {
text-decoration: underline;
}
strong {
padding: 1em;
border: 1px solid #000;
}
</style>
</head>
<body>
<h1>test</h1>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure <strong>dolor</strong> in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</body>
</html>