如何用纯CSS创建一个三角形?
本帖最后由 不二如是 于 2020-3-17 17:29 编辑http://xxx.fishc.com/forum/201704/17/074208jmk6okimmolkr4iz.png
问:
如何用纯CSS创建一个三角形?
答:
**** Hidden Message *****
○面试题索引贴●
如果喜欢,请订阅{:10_303:} :
HTML5 - 庖丁解牛 + JavaScript - 庖丁解牛
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
#triangle-up{
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
}
</style>
</head>
<body>
<div id="triangle-up"></div>
</body>
</html>
aoliann 发表于 2017-5-19 00:46
#triangle-up{
width: 0;
height: 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
#triangle-up{
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
}
</style>
</head>
<body>
<div id="triangle-up"></div>
</body>
</html> 厉害了 () 学习 1 厉害 阿拉伯烤鱼 <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
div {
width:50px;
height:50px;
border:100px solid;
/* 平分效果 */
/*border-color:red green blue black; */
/* 单个三角形 */
border-color:blue red lightgreen yellow;
}
</style>
</head>
<body>
<div></div>
</body>
</html> socool {:5_90:} 1 border- m d 1 123 看看 1
页:
[1]
2