css 边框上如何写入文字?

如题所述

第1个回答  2022-11-16

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<body>标签中,输入html代码:。

<div style="margin-top: 30px;width: 200px;height:80px;border: 1px solid blue;">

<div style="background-color: white;position: absolute;left: 30px;top: 15px;">文字</div>

</div>

3、浏览器运行index.html页面,此时实现了边框角落开口显示文字。

相似回答