css实现图文卡片悬浮线条交汇显示文字动画效果代码
代码语言:html
所属分类:悬停
代码描述:css实现图文卡片悬浮线条交汇显示文字动画效果代码
代码标签: css 图文 卡片 悬浮 线条 交汇 显示 文字 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <style> @import url(https://fonts.googleapis.com/css?family=Raleway:400,500,700); /* Demo purposes only */ html { height: 100%; } body { background-color: #212121; display: flex; justify-content: center; align-items: center; flex-flow: wrap; margin: 0; height: 100%; } figure.snip1477 { font-family: 'Raleway', Arial, sans-serif; position: relative; overflow: hidden; margin: 10px; min-width: 230px; max-width: 315px; width: 100%; color: #ffffff; text-align: center; font-size: 16px; background-color: #000000; } figure.snip1477 *, figure.snip1477 *:before, figure.snip1477 *:after { -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all 0.55s ease; transition: all 0.55s ease; } figure.snip1477 img { max-width: 100%; backface-visibility: hidden; vertical-align: top; opacity: 0.9; } figure.snip1477 .title { position: absolute; top: 58%; left: 25px; padding: 5px 10px 10px; } figure.snip1477 .title:before, figure.snip1477 .title:after { height: 2px; width: 400px; position: absolute; content: ''; background-color: #ffffff; } figure.snip1477 .title:before { top: 0; left: 10px; -webkit-transform: translateX(100%); transform: translateX(100%); } figure.snip1477 .title:after { bottom: 0; right: 10px; -webkit-transform: translateX(-100%); transform: translateX(-100%); } figure.snip1477 .title div:before, figure.snip1477 .title div:after { width: 2px; height: 300px; position: absolute; content: ''; background-color: #ffffff; } figure.snip1477 .title div:before { top: 10px; right: 0; -webkit-transform: translateY(100%); transform: translateY(100%); } figure.snip1477 .title div:after { bottom: 10px; left: 0; -webkit-transform: translateY(-100%); transform: translateY(-100%); } figure.snip1477 h2, figure.snip1477 h4 { margin: 0; text-transform: uppercase; } figure.snip1477 h2 { font-weight: 400; } figure.snip1477 h4 { display: block; font-weight: 700; background-color: #ffffff; padding: 5px 10px; color: #000000; } figure.snip1477 figcaption { position: absolute; bottom: 42%; left: 25px; text-align: left; opacity: 0; padding: 5px 60px 5px 10px; font-size: 0.8em; font-wei.........完整代码请登录后点击上方下载按钮下载查看
网友评论0