css布局实现悬停饼奶酪裂开分开效果代码
代码语言:html
所属分类:悬停
代码描述:css布局实现悬停饼奶酪裂开分开效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; background: #f8f9f2; } .box { width: 100px; height: 100px; position: relative; } .box:hover .bread { transform: translate(-30px, 0%); } .box:hover .bread:nth-child(2) { transform: translate(30px, 0%); } .box:hover .bread-side { transform: skewX(21deg) scaleX(0.6) translate(50px, 0px); } .box:hover .cheese { transform: skewX(21deg) scaleX(1); } .box .bread { position: absolute; width: 100%; height: 100%; transition: all 0.4s cubic-bezier(0.65, 0.0.........完整代码请登录后点击上方下载按钮下载查看
网友评论0