*新闻详情页*/>
实际效果图:
方式1的实际效果图:
方式2的实际效果图:
方式3的实际效果图:
方式1:由于有情况,全部完成起来较为便捷,尖角的內部同个色调便可以无需考虑到遮挡难题
html:
<div id="first"> <p>带情况色调的小3角完成是较为简易的!</p> <span id="top"></span> </div>
css
#top { position: absolute; width: 0px; height: 0px; line-height: 0px;/*以便避免ie下出現题目*/ border-bottom: 10px solid #89b007; border-left: 10px solid #fff; border-right: 10px solid #fff; left: 76px; top: ⑴0px; } #first { border-radius:8px; -moz-border-radius:8px;-ms-border-radius:8px;-o-border-radius:8px;-webkit-border-radius:8px; position: absolute; height: 150px; width: 300px; background: #89b007; left: 22px; top: 33px; } #first p{ padding:10px; line-height:1.5; color:#FFF;}
方式2:
html
<div class="w"> <div class="x"> <p><a href="#">用朝向目标的观念去撰写css,用朝向目标的心理状态去撰写css。</a></p> <span class="z">◆</span> <span class="y">◆</span> </div> </div>
css
* { margin: 0; padding: 0; } a{ color:#666; text-decoration:none; line-height:25px; text-indent:24px;} .w{ width:200px; position:absolute; background:#999; left:400px; top:200px; font-size:12px; text-align:left}/*仿真模拟灰色黑影情况层*/ .x{ width:180px; position:relative; background:#fff; border:1px solid #ccc; padding:10px; left:⑷px; top:⑷px;}/*內容div*/ .y , .z{ position: absolute; left: 141px; } .y{ color: #ccc; font-size: 19px; top:⑴2px; z-index:1; }/*仿真模拟小3角*/ .z{ color: #fff; font-size: 19px; top:⑴1px; z-index:3; }/*仿真模拟小3角*/
方式3:
<div id="content"> <span class="out"></span><span class="iner"></span> <span class="right"></span> <p>无论写甚么內容,总而言之便是要完成无图小3角,如果有情况色调那倒是极好的,沒有的话还可以,便是略微不便1点</p> </div>
#content { text-indent: 2em; box-shadow: 0px 0px 10px #999; padding: 10px; font-size: 12px; line-height: 1.5; border-radius: 5px; height: 100px; width: 250px; position: relative; margin: 200px auto; border: 1px solid #CCC; } span { position: absolute; left: 25px; height: 0px; width: 0px; } /*上部小3角完成款式刚开始*/ span.out { line-height: 0; border-width: 10px; border-color: transparent transparent #CCC transparent; border-style: dashed dashed solid dashed; top: ⑵0px; } span.iner { border-width: 10px; border-color: #fff transparent #FFF transparent; border-style: dashed dashed solid dashed; top: ⑴9px; line-height: 0; } /*右部小3角完成款式刚开始*/ span.right { background: #FFF; border-width: 1px; width: 16px; height: 16px; border-color: #CCC #CCC transparent transparent; border-style: solid solid dashed dashed; left: 270px; top: 30px; border-radius: 0 0 100% 0;/*这里radius的值不必选择肯定值由于在变大或变小的全过程中会造成封不住口的状况*/ line-height: 0; box-shadow: 5px 0 10px #aaa; }
好了,以上所述是网编给大伙儿详细介绍的CSS完成网页页面的尖角、小3角、不一样方位尖角的方式小结,期待对大伙儿有一定的协助。
Copyright © 2002-2020 如何织梦建站_如何创建网站_网站建立_公众号搭建_网站建站的 版权所有 (网站地图) 粤ICP备10235580号