css+div实现书本鼠标悬浮三维翻转显示文字效果代码
代码语言:html
所属分类:悬停
代码描述:css+div实现书本鼠标悬浮三维翻转显示文字效果代码
代码标签: css div 书本 鼠标 悬浮 三维 翻转 显示 文字
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;1,300&family=Quicksand:wght@500&display=swap'>
<style>
* {
border: 0;
margin: 0;
box-sizing: border-box;
}
:root {
--mobile-width: 325px;
--mobile-height: 670px;
--mobile-radius: 25px;
--separator-height: 500px;
--bg: #fdf3f2;
--mobile-bg: #fdeae6;
--intro-bg: #eed7d1;
--font-color: #807b7b;
--transition: transform 0.7s ease-in-out;
}
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: var(--bg);
}
.info {
font-family: "Quicksand", sans-serif;
font-family: "Open Sans", sans-serif;
font-style: italic;
font-size: 26px;
margin-top: 10px;
color: var(--font-color);
}
.mobile-layout {
width: var(--mobile-width);
height: var(--mobile-height);
margin: 30px 0;
border-radius: var(--mobile-radius);
perspective: 500px;
overflow: hidden;
color: var(--font-color);
background-color: var(--mobile-bg);
box-shadow: 36px 36px 50px 15px #eed7d1d1;
}
.mobile-layout .notification-header {
position: fixed;
top: 5px;
width: 100%;
padding: 5px 15px;
display: flex;
justify-content: space-between;
font-size: 12px;
font-family: "Open Sans", sans-serif;
font-weight: bold;
z-index: 6;
}
.mobile-layout .actions {
position: fixed;
top: 37px;
width: 100%;
padding: 50px;
display: flex;
justify-content: space-between;
font-size: 20px;
z-index: 6;
}
.mobile-layout .book-cover {
position: relative;
height: var(--separator-height);
width: calc(var(--mobile-width) * 2);
left: -52.5%;
border-top-left-radius: var(--mobile-radius);
bo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0