请问这种样式不用图片怎么实现,谢谢!
请问这种样式不用图片怎么实现,宽度自适应,谢谢!
如图:
[解决办法]
用绝对定位吧,将文字那块定位到框框上面就可以了
[解决办法]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css">#all{ margin:20px auto; width:960px;}#panel{ border:#09F 1px solid; position:relative; width:600px;}#title{ position:absolute; left:20px; top:-15px; background:#FFF; padding:5px 10px;}</style></head><body><div id="all"><div id="panel"><div id="title">基本信息</div><p>内容</p></div></div></body></html>
[解决办法]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.legend {
color: #FF0000;
}
-->
</style>
</head>
<body><fieldset><legend class="legend">test</legend>
</fieldset>
</body>
</html>