border制作带箭头的提示框等好看的效果

5 篇文章 1 订阅
1 篇文章 0 订阅

<span style="font-family: Arial, Helvetica, sans-serif;">     </span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(204, 51, 204);">这几天在写进度条时,用到进度条提示框,效果挺好的,代码也很好懂,特来给大家分享一哈<img alt="大笑" src="http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif" /></span>

    进度条效果相信大家可能都会吧,就是简单的颜色填充,用js控制就好,闲话不多说,一起看一哈带箭头的进度条提示框,先看一哈效果   

                           

这是我模仿牛客网写的一个页面~

  介绍一哈这个方法:

<style type="text/css">
.demo{width:100px;height:25px;background:orange;border-radius:4px;position:relative;}
.triangle{width:0;height:0;border-color:orange transparent transparent transparent;border-style:solid dashed dashed dashed;border-width:10px;position:absolute;top:20px;left:30px;}
</style>
<div class="demo">
   <span class="triangle"></span>
</div>
<span style="color:#cc33cc;"></span>
<pre name="code" class="css">这个代码兼容性方面还欠缺...大神可以帮指点指点哈
   跟这个原理还有一个挺像的,大家可以看看。 


code:

<h3 class="words-item"></h3>
.words-item{
    background:#EE7600;
    width:400px;
    border-right:20px solid #fff;
    border-left:20px solid #EE7600;
    border-top:20px solid #EE7600;
    border-bottom:20px solid #EE7600;
}

基本上就是做出这种效果然后改变颜色即可,其他效果都大同小异,可以试着去做做,用在网页上效果不错


  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值