js+css实现咖啡环形菜单旋转效果代码

代码语言:html

所属分类:其他

代码描述:js+css实现咖啡环形菜单旋转效果代码

代码标签: js css 咖啡 环形 菜单 旋转

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
*{
    box-sizing: border-box;
}
html, body {
    height: 100%;
    overflow: hidden;
}
body {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 0;
    font-family: Poppins;
    background: #cebca6;
}
@media screen and (max-height: 500px) { body > * { scale: 0.8 };}
@media screen and (max-height: 430px) { 
    body > * { scale: 0.7 } 
    .options { translate: 259px 2px !important;}
}
.options {
    position: relative;
    width: 200px;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: rgba(0,0,0, 0.04);
    padding: 12px;
}
.options > div {
    transition: all 0.1s ease-in-out;
}
.options > div:hover {
    background: rgba(255,255,255, 1);
    cursor: pointer;
    font-size: 22px;
    box-shadow: 
    0 0 2px 0px rgba(0,0,0,0.2),
    0 0 3px 2px rgba(255, 255, 255, 0.1),
    0 0 3px 0 rgba(0,0,0, 0.1);
    color: #462814be;
}
.options:hover > * {
    animation-play-state: paused;
}

.options {
    background: none;
    height: fit-content;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0%;
    margin: auto;
    translate: 259px 12px;
    transform-origin: -157px 107%;
    rotate: -100deg;
}
@keyframes rotateC {
    0% {rotate: 0deg;}
    100% {rotate: 360deg;}
}
.options > div {
    --_speed: 4;
    color: #4628148e;
    position: absolute;
    border-radius: 4px;
    background-color: rgba(255,255,255, 0.2);
    transform-origin: -145px 50%;
    padding: 4px 12px 1px 22px;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE .........完整代码请登录后点击上方下载按钮下载查看

网友评论0