Moving dotted border using CSS

后端 未结 8 1882
感情败类
感情败类 2020-12-08 10:57

I have class that applies a dotted style border property to a text block at runtime. I am trying to find a solution, using CSS, that makes the border move like a gif image.

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 11:24

    Not CSS3, but it works: http://matthewjamestaylor.com/blog/animated-photoshop-selection-on-a-web-page

    You can make it without images, by utlizing CSS3 gradients for the stripes and animating background-position (rough demo: http://codepen.io/christopheschwyzer/pen/CEwBI), but I wouldn't recommend it since it would only work well on Webkit.

提交回复
热议问题