jquery+css实现简洁横向文字列表点击放大效果代码
代码语言:html
所属分类:布局界面
代码描述:jquery+css实现简洁横向文字列表点击放大效果代码,点击横向的文字列表试试。
代码标签: jquery css 简洁 横向 文字 列表 点击 放大
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: grey;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 0;
min-height: 100vh;
overflow-x: hidden;
user-select: none;
}
.articles {
height: 220px;
width: 100%;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
padding-left: 15%;
overflow: hidden;
align-items: center;
margin-top: 80px;
transition: transform 0.5s ease;
}
.articles .articleName {
width: 225px;
height: 150px;
flex-grow: 0;
flex-shrink: 0;
border-left: 1px solid white;
border-bottom: 1px solid white;
border-top: 1px solid white;
justify-content: left;
transition: all 0.15s ease;
cursor: pointer;
position: relative;
}
.articles .articleName .contain {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.articles .articleName::before {
content: attr(data-num);
position: absolute;
top: -28px;
font-family: "Roboto", sans-serif;
font-size: 15px;
left: 0;
color: rgba(190, 190, 190, 0.6);
transition: all 0.25s ease;
}
.articles .articleName:hover::before {
color: gainsboro;
}
.articles .articleName:active span {
transform: scale(0.92);
}
.articles .articleName::after {
content: "arrow_forward";
position: absolute;
bottom: 20px;
left: 10px;
font-family: "Material Icons";
font-size: 32px;
color: white;
transition: opacity 0.15s ease, left 0.5s ease;
opacity: 0;
}
.articles .articleName:hover {
background: #23a943;
}
.articles .articleName:hover::after {
opacity: 1;
left: 20px;
}
.articles .articleName:last-child {
border-right: 1px solid white;
}
.articles .articleName.zoom {
background-color: #23a943;
}
.articles .articleName.zoom::after {
left: 100%;
}
.articles .articleName span {
font-family: "Roboto", sans-serif;
color: white;
font-size: 26px;
letter-spacing: 1px;
max-width: 175px;
display: block;
transition: transform 0.1s ease, margin 0.5s ease;
padding: 20px;
position: absolute;
}
@media (min-height: 500px) {
.articles {
position: absolute;
top: 50%;
transform: translateY(-50%);
margin-top: 0;
}
}
.logo {
height: 70px;
font-size: 24px;
font-family: "Montserrat", sans-serif;
padding: 0 30px;
color: white;
position: fixed;
top: 0;
left: 0;
line-height: 65px;
z-index: 10;
background-size: 100% 100%;
backgr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0