卡片悬浮图片旋转消失动画效果
代码语言:html
所属分类:悬停
代码描述:卡片悬浮图片旋转消失动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap'); :root { --width: 300px; } .preload{ display:none; } .bg { display: block; width: var(--width); margin: 0 auto; cursor: pointer; border-radius: 15px; background: rgba(219, 124, 0, 1); -webkit-transition: background 1.5s; transition: background 1.5s; } .bg:hover { background: orange url('http://repo.bfw.wiki/bfwrepo/image/5ea393651ab42.png'); background-position: 50% 80%; background-size: cover; background-size: 100%; ; } .orange-halved { width: var(--width); } .orange-halved:hover { -webkit-animation: spin 1s 1 forwards; animation: spin 1s 1 forwards; } @-webkit-keyframes spin { to { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0