css实现鼠标悬浮分享按钮效果代码
代码语言:html
所属分类:悬停
代码描述:css实现鼠标悬浮分享按钮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.min.css"> <style> *, :before, :after { margin: 0; padding: 0; box-sizing: border-box; } body { height: 100vh; display: flex; justify-content: center; align-items: center; } button { width: 270px; height: 60px; border: none; background: #ffe4c4; display: flex; justify-content: center; align-items: center; position: relative; } button:before { content: ""; position: absolute; width: 0; height: 3px; background-color: #000; top: 0; left: 0; transition: width 1s ease-in-out; } button:after { content: ""; position: absolute; width: 0; height: 3px; background-color: #000; bottom: 0; right: 0; transition: width 1s ease-in-out; } button:hover:before, button:hover:after { width: 100%; } .letters { width: 50px; height: 50px; perspective: 600px; } .card { width: 100%; height: 100%; position: relative; transition: transform 1s ease-in-out; transform-style: preserve-3d; } .card_face { position: absolute; height: 100%; width: 100%; backface-visibility: hidden; font-size: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 600; } .back { transform: rotateY.........完整代码请登录后点击上方下载按钮下载查看
网友评论0