HTML设置悬停效果,css悬停效果

.draw-outline {

box-shadow:inset 0 0 0 2px #000;

color:#000;

-webkit-transition:color 0.25s 0.125s;

transition:color 0.25s 0.125s;

position:relative;

}

.draw-outline::before,.draw-outline::after {

border:0 solid transparent;

box-sizing:border-box;

content:'';

pointer-events:none;

position:absolute;

width:0;

height:0;

}

.draw-outline::before {

top:0;

right:0;

}

.draw-outline::after {

left:0;

bottom:0;

}

.draw-outline::after {

border-top-width:2px;

border-left-width:2px;

}

.draw-outline::before {

border-bottom-width:2px;

border-right-width:2px;

}

.draw-outline:hover {

color:#00a0e9;

}

.draw-outline:hover::before,.draw-outline:hover::after {

border-color:#00a0e9;

-webkit-transition:border-color 0s,height 0.25s,width 0.25s;

transition:border-color 0s,height 0.25s,width 0.25s;

width:100%;

height:100%;

}

.draw-outline:hover::before {

-webkit-transition-delay:0s,0s,0.25s;

transition-delay:0s,0s,0.25s;

}

.draw-outline:hover::after {

-webkit-transition-delay:0.5s,0.5s,0.75s;

transition-delay:0.5s,0.5s,0.75s;

}

.btn {

background:none;

border:none;

cursor:pointer;

line-height:1.5;

font:700 1.2rem 'Roboto Slab',sans-serif;

padding:1em 2em;

letter-spacing:0.05rem;

}

.btn:focus {

outline:2px dotted #55d7dc;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值