我想创建以下布局:
+----------------------------------+
| TITLE |
| |
| + |
| |
| (drop here) |
+----------------------------------+
使用以下HTML:
TITLE
(drop here)
和CSS:
.drop-box {
width: 300px;
height: 150px;
border: 1px solid black;
text-align: center;
}
.drop-box:before {
content: "+";
width: 100%;
height: 100%;
font-size: 3em;
text-align: center;
line-height: 150px;
display: block;
}
问题是文本现在放在包含”内部的框下方.如何将文本放在框内.我试过使用position:relative来表示p标签,但这不起作用.