css部分:*{ margin: 0; padding: 0; list-style: none;}.container{ width: 100vw; height: 100vh; background: #222222; display: flex; justify-content: center; align-items: center;}...
css部分:
*{ margin: 0; padding: 0; list-style: none; } .container{ width: 100vw; height: 100vh; background: #222222; display: flex; justify-content: center; align-items: center; } .nav{ width: 15vh; height: 15vh; line-height: 15vh; background: #FFFFFF; border-radius: 100%; font-size: 30px; color: #548B54; text-align: center; position: relative; } .nav .ul{ border: 11.5vh solid transparent; position: absolute; top: -4vh; left: -4vh; transform: scale(0); transition: transform 1.3s .4s; } .nav .ul li{ width: 5vh; height: 5vh; line-height: 5vh; background: #FFFFFF; border-radius: 100%; font-size: 20px; position: absolute; top: -11.2vh; left: -11.2vh; transform-origin: 100px 100px; transition: all .4s .4s; } .nav:hover{ background: rgba(255,255,255,.75); } .nav:hover .ul{ transform: scale(1); transition: transform .4s .1s ; } .nav:hover .ul li{ transition-delay:0.02s; } .nav:hover .ul li:nth-of-type(1){ transform: rotate(0deg); } .nav:hover .ul li:nth-of-type(2){ transform: rotate(40deg); } .nav:hover .ul li:nth-of-type(3){ transform: rotate(80deg); } .nav:hover .ul li:nth-of-type(4){ transform: rotate(120deg); } .nav:hover .ul li:nth-of-type(5){ transform: rotate(160deg); }
.nav:hover .ul li:nth-of-type(6){ transform: rotate(200deg); } .nav:hover .ul li:nth-of-type(7){ transform: rotate(240deg); } .nav:hover .ul li:nth-of-type(8){ transform: rotate(280deg); } .nav:hover .ul li:nth-of-type(9){ transform: rotate(320deg);
}
html部分:
<!DOCTYPE html>
<html> <head> <meta charset="UTF-8"> <title></title>
</head> <body> <div class="container"> <div class="nav"> 菜单 <div class="ul"> <a href="">1</a> <a href="">2</a> <a href="">3</a> <a href="">4</a> <a href="">5</a> <a href="">6</a> <a href="">7</a> <a href="">8</a> <a href="">9</a> </div> </div> </div> </body> </html>
本站主要用于,日常笔记的记录,和生活日志。本站不保证所有内容信息可靠!(大多数文章属于搬运!)如有版权问题!请联系我立即删除“abcdsjx@126.com”