CSS怎么制作边框线
发布网友
发布时间:2022-04-23 05:33
我来回答
共3个回答
热心网友
时间:2022-04-06 14:18
定义一个div或者其他的元素,如p 、h1 2 3 4 5 6、它们的border属性,就可以了。
如:border: #000000 solid 1px; 这个就定义了一个1像素的黑色的直线边框。
border-top: 指上边框,其他几个指相应的边框。
热心网友
时间:2022-04-06 15:36
做边框有两种:一种是自己做的、在用他来做背景.<div style="background:url()repeat-x(y) left bottom"不过这个要麻烦点不过有时候为了网页的美观这也是必要的。还有一种就是直接用border他可以简化,比如你四个边只有上面不要边时你可以这样写 border:1px solid #ccc; border-top:none;
热心网友
时间:2022-04-06 17:11
<!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>
.xiao { height:100px; width:800px; border:1px solid #000; border-top-style: none; border-bottom-style: none;}
</style>
</head>
<body>
<div align="center" class="xiao"></div>
</body>
</html>
你不要把height高度设置为0 ,这样看不到效果的~~