使用css画三角形的方法代码
网站建设 2023-01-28 21:39www.1681989.com免费网站
用纯css画个三角形以下是源代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd">http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href="http://.w3./1999/xhtml">http://.w3./1999/xhtml</a>">
<head>
<title>用纯css画个三角形</title>
</head>
<body>
<style type="text/css">
.rightdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color:transparent transparent transparent #A9DBF6;
}
.bottomdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: #A9DBF6 transparent transparent transparent;
}
.leftdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: transparent #A9DBF6 transparent transparent;
}
.direction
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: transparent transparent #A9DBF6 transparent;
}
</style>
<div class="rightdirection"></div>
<p>
<div class="bottomdirection"></div>
<p>
<div class="leftdirection"></div>
<p>
<div class="direction"></div>
</body>
</html>
画个小三角形
<style>
#jb51_a{ border-:10px solid #FFFFCC;
border-left:10px solid #FF3300;
border-bottom:10px solid #FFFFCC;}
</style>
<div id="jb51_a"></div>
以下代码兼容IE6
<style>b.sanjiao{
display:le-block;
width: 0;
height: 0;
border-width: 10px 10px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #ff0000;
font-size: 0;
le-height: 0;
-moz-transition: -moz-transform .2s ease-;
-o-transition: -o-transform .2s ease-;
transition: transform .2s ease-;
vertical-align:text-;
marg-left:5px
}</style>
<b class="sanjiao"></b>
复制代码
代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd">http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href="http://.w3./1999/xhtml">http://.w3./1999/xhtml</a>">
<head>
<title>用纯css画个三角形</title>
</head>
<body>
<style type="text/css">
.rightdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color:transparent transparent transparent #A9DBF6;
}
.bottomdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: #A9DBF6 transparent transparent transparent;
}
.leftdirection
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: transparent #A9DBF6 transparent transparent;
}
.direction
{
width:0;height:0;
le-height:0;
border-width:20px;
border-style:solid;
border-color: transparent transparent #A9DBF6 transparent;
}
</style>
<div class="rightdirection"></div>
<p>
<div class="bottomdirection"></div>
<p>
<div class="leftdirection"></div>
<p>
<div class="direction"></div>
</body>
</html>
画个小三角形
复制代码
代码如下:<style>
#jb51_a{ border-:10px solid #FFFFCC;
border-left:10px solid #FF3300;
border-bottom:10px solid #FFFFCC;}
</style>
<div id="jb51_a"></div>
以下代码兼容IE6
复制代码
代码如下:<style>b.sanjiao{
display:le-block;
width: 0;
height: 0;
border-width: 10px 10px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #ff0000;
font-size: 0;
le-height: 0;
-moz-transition: -moz-transform .2s ease-;
-o-transition: -o-transform .2s ease-;
transition: transform .2s ease-;
vertical-align:text-;
marg-left:5px
}</style>
<b class="sanjiao"></b>
上一篇:css3高级选择器使用方法
下一篇:css中的clear属性使用方法实例介绍
网站设计
- 静宁会SEO的网站建设公司:全面提升您的网络影
- 提升在线业务的关键:选择最佳的丽水网站建设
- 浙江网站优化发展潜力如何
- 井研专业的网站建设公司:打造您的在线品牌
- 灵山SEO网站建设公司:提升您的在线业务表现
- 蒙城网站建设优化公司:提升您网站表现的理想
- 阳谷企业网站优化:提升线上业务力的关键
- 樟树专业的网站建设公司:打造您在线业务的坚
- 通河百度SEO排名的策略与技巧
- 重庆百度快照排名如何进行精准的客户引流
- 重庆百度快照排名
- 常宁便宜的建站公司:助您轻松打造在线业务
- 巫溪百度网站优化:提升网站曝光率与流量的关
- 湖北整站优化怎么做才能放大客户需求
- 闸北网站建设多少钱?全面解析与预算规划
- 辽宁企业网站优化怎么做电话营销