我想div css为div创建一个div,在右上边框显示div的名称。喜欢:----------- DEMO ------------------------------------ -
答案 0 :(得分:0)
我认为你需要跟随:
<强> HTML:强>
<div class="test">
<span>Your text </span>
</div>
<强> CSS:强>
.test {
border: 1px solid #000000;
line-height: 0;
text-align: left;
margin-top:40px;
height:100px;
width:400px;
}
.test span {
background-color: #ffffff;
padding: 0 10px;
margin: 0 20px;
}
检查Fiddle