动画对角线查询

编程入门 行业动态 更新时间:2024-10-28 04:28:17
本文介绍了动画对角线查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道如果有人知道如何使用jquery创建一条对角线,并对其进行动画处理,这样当它出现时,它的绘制而不是仅仅出现。

I was wondering if anyone knows how to create a diagonal line using jquery and animate it so that when it appears its drawn on rather than just appears?

Muchos对于帮助!!

A simple jsfiddle would be awesome.

一个简单的jsfiddle将是真棒。 / p>

Muchos for the help!!

推荐答案

你可以用纯CSS实现:

You could actually do it with pure CSS:

HTML :

<div class='box'></div>

CSS :

.box { overflow: hidden; outline: dotted 1px; width: 8.09em; height: 5.88em; background: linear-gradient(36deg, transparent 49.5%, black 49.5%, black 50.5%, transparent 50.5%) no-repeat -8.09em -5.88em; background-size: 100% 100%; animation: drawDiag 2s linear forwards; } @keyframes drawDiag { to { background-position: 0 0; } }

Circle

HTML :

<div class='circle'> <div class='cover'></div> </div>

CSS :

.circle { overflow: hidden; position: relative; width: 10em; height: 10em; } .circle:before { position: absolute; width: inherit; height: inherit; border-radius: 50%; box-shadow: inset 0 0 0 1px black; content: ''; } .cover { position: absolute; margin: 0 -50%; width: 200%; height: inherit; transform-origin: 50% 0; background: white; animation: revealCircle 5s linear forwards; } @keyframes revealCircle { to { transform: rotate(180deg); } }

更多推荐

动画对角线查询

本文发布于:2023-11-30 10:20:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1649634.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对角线   动画

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!