双语网站费用,上饶做网站的,制作网页可以用什么软件,动漫制作专业有前途吗效果如下#xff1a; 外层容器 (shop_wrap)#xff1a; 设置外边距 (padding) 提供一些间距和边距 圆形容器 (TheCircle)#xff1a; 使用相对定位 (position: relative)#xff0c;宽度和高度均为 180px#xff0c;形成一个圆形按钮圆角半径 (border-radius) 设置为 50% 外层容器 (shop_wrap) 设置外边距 (padding) 提供一些间距和边距 圆形容器 (TheCircle) 使用相对定位 (position: relative)宽度和高度均为 180px形成一个圆形按钮圆角半径 (border-radius) 设置为 50%使其呈现圆形边框 (border) 和阴影 (box-shadow) 提供边框和轻微的立体感设置溢出隐藏 (overflow: hidden)确保水波纹效果在容器内显示鼠标悬停时显示手型光标 (cursor: pointer) 水波纹容器 (Water) 绝对定位 (position: absolute)覆盖在圆形容器上设置宽度和高度为 100%形成一个完整的圆形水波纹效果设置背景颜色 (background-color) 为水波纹的颜色圆角半径 (border-radius) 同样设置为 50%溢出隐藏 (overflow: hidden)确保水波纹效果不超出容器 文字居中显示 (CenteredText) 绝对定位 (position: absolute)位于水波纹容器中心使用 transform 属性将文字居中显示 水波纹效果 (Water::after 和 Water::before) 使用 ::after 和 ::before 伪元素创建水波纹效果设置宽度和高度为 150%略大于容器以确保水波纹效果覆盖整个容器设置圆角半径形成圆形效果设置动画 (animation)通过关键帧 (keyframes) 实现水波纹的旋转和缩放效果
源码如下
templatediv classshop_wrapdiv classTheCirclediv classWaterspan classCenteredText上传图片/span/div/div/div
/templatescript setup
/scriptstyle langscss scoped
.shop_wrap {padding: 50px; /* 设置外层容器的内边距 */.TheCircle {position: relative;width: 180px; /* 设置圆形容器的宽度 */height: 180px; /* 设置圆形容器的高度 */border-radius: 50%; /* 圆形容器的圆角半径 */border: 1px solid #38b973; /* 圆形容器的边框样式 */box-shadow: 0 0 0 1px #38b973; /* 圆形容器的阴影样式 */overflow: hidden; /* 确保容器裁剪水波纹效果 */cursor: pointer; /* 鼠标悬停时显示手型光标 */}.Water {position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-color: #38b973; /* 水波纹的颜色 */border-radius: 50%;overflow: hidden;z-index: 1; /* 确保水波纹在文字之上 */}.CenteredText {position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%); /* 居中显示文字 */color: #333; /* 文字颜色 */z-index: 2; /* 确保文字在水波纹之上 */}.Water::after {content: ;position: absolute;top: 0;left: 50%;width: 150%;height: 150%;border-radius: 40%;background-color: rgb(240, 228, 228); /* 水波纹内部颜色 */animation: real 5s linear infinite; /* 实际水波纹的动画效果 */}keyframes real {0% {/* 初始状态向上平移50%、左平移65%并旋转0度 */transform: translate(-50%, -65%) rotate(0deg); }100% {/* 终止状态向上平移50%、左平移65%并旋转360度形成旋转一周的效果 */transform: translate(-50%, -65%) rotate(360deg); }}.Water::before {content: ;position: absolute;top: 0;left: 50%;width: 150%;height: 150%;border-radius: 42%;background-color: rgb(240, 228, 228, 0.2); /* 水波纹外部颜色及透明度 */animation: virtual 7s linear infinite; /* 虚拟水波纹的动画效果 */}keyframes virtual {0% {/* 初始状态向上平移50%、左平移60%不进行缩放旋转0度 */transform: translate(-50%, -60%) scale(1) rotate(0deg); }100% {/* 终止状态向上平移50%、左平移60%进行1.1倍的缩放旋转360度形成旋转一周的效果并放大水波纹 */transform: translate(-50%, -60%) scale(1.1) rotate(360deg); }}
}
/style