1 Star 2 Fork 0

wyfsama/homePage_demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
style.css 11.54 KB
一键复制 编辑 原始数据 按行查看 历史
wyfsama 提交于 2021-04-05 20:14 . v1 静态页面初步完成
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Helvetica, "PingFang SC", "Microsoft Yahei", sans-serif;
font-size: 14px;
/* overflow-y: hidden; */
}
html{
overflow-x: hidden;
}
img {
width: 100%;
}
:root {
--primary-color: #ff434f;
--secondary-color: #e3e3e3;
--text-color-lightest: #e7e9ec;
--text-color-darker: #2e2e2e;
--text-color-dark: #494949;
--text-color-gray: #8b8b8b;
--text-color-dark-gray: #727272;
--text-color-light-gray: #c6c6c6;
--backdrop-color: rgba(42, 42, 42, 0.69);
}
header {
width: 100vw;
height: 80px;
display: grid;
padding: 0 40px;
grid-template-columns: 1fr 2fr;
align-items: center;
position: relative;
z-index: 200;
}
header.sticky{
position: fixed;
background-color: white;
box-shadow: 0 0 18px rgba(0, 0, 0, 0.2);
animation: dropDown 0.5s ease-in-out forwards;
-webkit-animation: dropDown 0.5s ease-in-out forwards;
}
header.sticky .logo,
header.sticky nav a,
header.sticky nav i{
color: var(--text-color-dark);
}
@keyframes dropDown {
from {
transform: translateY(-100px);
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
}
to{
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
}
.logo {
font-size: 24px;
font-weight: 600;
color: var(--text-color-lightest);
}
header nav {
justify-self: end;
}
header nav i {
color: var(--text-color-lightest);
}
header nav a {
color: var(--text-color-lightest);
text-decoration: none;
margin: 0 24px;
}
header .burger {
display: none;
}
.glide {
position: relative;
top: -80px;
z-index: 50;
}
.glide__slide img,
.glide__slide video {
width: 100vw;
height: 100vh;
object-fit: cover;
}
.slide-caption {
position: absolute;
color: var(--text-color-lightest);
z-index: 70;
text-align: center;
max-width: 60vw;
}
.glide__slide {
display: flex;
justify-content: center;
align-items: center;
}
.slide-caption h1 {
font-size: 54px;
font-weight: 600;
}
.slide-caption h3 {
font-size: 24px;
margin: 48px 0;
}
.slide-caption.left {
max-width: 80vw;
text-align: left;
}
.slide-caption > * {
opacity: 0;
}
.backdrop {
background: var(--backdrop-color);
z-index: 60;
position: absolute;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
opacity: 0.5;
}
.explore-btn {
padding: 14px 32px;
background-color: var(--primary-color);
border: 0;
color: var(--text-color-lightest);
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
font-size: 18px;
cursor: pointer;
outline: none;
}
.content-wrapper {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
section {
display: grid;
justify-items: center;
max-width: 1180px;
padding: 0 80px;
}
.section-bg {
position: relative;
}
.section-bg::before {
content: "";
display: block;
position: absolute;
background-color: #f9fbfb;
width: 100vw;
height: 100%;
z-index: -1;
}
.title1 {
/* background-color: red; */
font-size: 34px;
color: var(--text-color-darker);
}
.title1::after {
content: "";
display: block;
width: 80%;
height: 4px;
background-color: var(--primary-color);
margin-top: 14px;
transform: translateX(10%);
-webkit-transform: translateX(10%);
-moz-transform: translateX(10%);
-ms-transform: translateX(10%);
-o-transform: translateX(10%);
}
.intro {
margin: 28px 0 60px 0;
font-size: 18px;
color: var(--text-color-dark-gray);
}
/* 关于我们 */
.about-us {
padding-bottom: 32px;
}
.features {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 126px 126px;
column-gap: 5vw;
}
.feature {
display: grid;
grid-template-areas:
"icon title"
"icon content";
grid-template-columns: 60px 1fr;
grid-template-rows: 1fr 3fr;
}
.feature i.fas {
display: flex;
justify-content: center;
align-items: center;
grid-area: icon;
font-size: 34px;
color: var(--primary-color);
}
.feature-title {
grid-area: title;
font-size: 18px;
color: var(--text-color-darker);
}
.feature-content {
grid-area: content;
color: var(--text-color-gray);
margin-top: 8px;
}
/* 成功案例 */
.showcases {
max-width: unset;
padding: 0;
padding-top: 72px;
}
.filter-btns {
margin-top: 54px;
margin-bottom: 38px;
}
.filter-btn {
margin: 0 7px;
background-color: var(--secondary-color);
border: 0;
color: var(--text-color-dark-gray);
padding: 8px 18px;
cursor: pointer;
transition: 0.4s;
-webkit-transition: 0.4s;
-moz-transition: 0.4s;
-ms-transition: 0.4s;
-o-transition: 0.4s;
}
.filter-btn:focus,
.filter-btn:active {
outline: none;
}
.filter-btn.active,
.filter-btn:hover {
background-color: var(--primary-color);
color: white;
}
.showcases .cases {
width: 100vw;
}
.showcases .case-item {
width: 25vw;
height: 20vw;
overflow: hidden;
}
.case-item img {
height: 100%;
object-fit: cover;
}
.service {
padding-top: 131px;
}
.services {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
column-gap: 38px;
row-gap: 34px;
}
.service-item {
display: grid;
grid-template-areas:
"icon title"
"icon content";
grid-template-columns: 70px 1fr;
grid-template-rows: 1fr 3fr;
padding: 24px;
box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.06);
}
.service-item i.fas {
grid-area: icon;
font-size: 42px;
color: var(--primary-color);
padding-top: 6px;
}
.service-item .service-title {
grid-area: title;
color: var(--text-color-darker);
font-size: 24px;
}
.service-item .service-content {
grid-area: content;
color: var(--text-color-dark-gray);
line-height: 30px;
font-size: 16px;
margin-top: 8px;
}
/* 团队介绍 */
.team-intro {
margin-top: 48px;
padding-top: 62px;
padding-bottom: 52px;
}
.team-members {
display: grid;
grid-template-columns: repeat(4, 1fr);
column-gap: 24px;
margin-top: 86px;
}
.team-member {
background-color: #fff;
box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.2);
text-align: center;
padding-bottom: 28px;
transition: 0.4s;
-webkit-transition: 0.4s;
-moz-transition: 0.4s;
-ms-transition: 0.4s;
-o-transition: 0.4s;
display: grid;
justify-items: center;
}
.profile-image {
overflow: hidden;
}
.profile-image img {
width: 100%;
height: 264px;
object-fit: cover;
object-position: center top;
}
.team-member .name {
margin-top: 18px;
font-size: 18px;
font-weight: 500;
color: var(--text-color-dark);
}
.team-member .position {
color: var(--text-color-dark-gray);
margin-top: 12px;
margin-bottom: 18px;
}
.social-links {
width: 100%;
max-width: 200px;
display: flex;
justify-content: space-between;
padding: 0 42px;
}
.social-links li {
list-style: none;
}
.social-links li a {
color: var(--text-color-dark);
/* font-size: 20px; */
text-decoration: none;
}
.team-member:hover {
transform: translateY(-20px) scale(1.05);
-webkit-transform: translateY(-20px) scale(1.05);
-moz-transform: translateY(-20px) scale(1.05);
-ms-transform: translateY(-20px) scale(1.05);
-o-transform: translateY(-20px) scale(1.05);
box-shadow: 0px 0px 36px rgba(0, 0, 0, 0.1);
}
/* 数据部分 */
.data-section {
max-width: unset;
width: 100vw;
background-image: url(images/adult-business-computer-contemporary-380769.jpg);
background-size: cover;
background-position: center;
height: 255px;
display: grid;
grid-template-columns: repeat(4, minmax(auto, 220px));
justify-content: center;
align-items: center;
position: relative;
z-index: 20px;
}
.data-section::after {
content: "";
display: block;
position: absolute;
background-color: var(--backdrop-color);
width: 100%;
height: 100%;
z-index: 1;
}
.data-piece {
width: 250px;
display: grid;
grid-template-rows: repeat(3, 1fr);
justify-items: center;
color: white;
position: relative;
z-index: 40;
}
.data-piece i.fas {
font-size: 44px;
}
.data-piece .num {
margin-top: 7px;
font-size: 41px;
font-weight: 600;
}
.data-piece .data-desc {
font-size: 18px;
font-weight: 500;
}
/* 公司动态 */
.company-activties {
margin-top: 88px;
}
.activties {
display: grid;
grid-template-columns: repeat(3, 1fr);
column-gap: 24px;
}
.activity {
box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);
padding: 24px;
transition: 0.4s;
-webkit-transition: 0.4s;
-moz-transition: 0.4s;
-ms-transition: 0.4s;
-o-transition: 0.4s;
}
.act-image-wrapper {
margin: -24px;
height: 255px;
overflow: hidden;
margin-bottom: 0;
}
.act-image-wrapper img {
min-height: 300px;
object-fit: cover;
}
.activity .meta {
margin-top: 20px;
margin-bottom: 12px;
color: var(--text-color-light-gray);
font-size: 12px;
display: flex;
}
.activity .meta > p:last-child {
margin-left: 36px;
}
.act-title {
color: var(--text-color-dark);
font-size: 18px;
margin: 16px;
}
.activity article {
color: var(--text-color-gray);
letter-spacing: 0.54px;
line-height: 24px;
}
.read-more-btn {
border: 0;
color: white;
background-color: var(--primary-color);
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
padding: 6px 14px;
margin-top: 24px;
}
.activity:hover {
transform: translateY(-20px) scale(1.05);
-webkit-transform: translateY(-20px) scale(1.05);
-moz-transform: translateY(-20px) scale(1.05);
-ms-transform: translateY(-20px) scale(1.05);
-o-transform: translateY(-20px) scale(1.05);
box-shadow: 0 0 36px rgba(0, 0, 0, 0.3);
}
/* 底部信息 */
footer{
margin-top: 124px;
background-color: #181818;
display: grid;
justify-items: center;
padding-top: 72px;
padding-bottom: 24px;
}
.footer-menus{
width: 100%;
max-width: 1180px;
display: grid;
grid-template-columns: 2fr repeat(4,1fr);
padding: 0 80px;
position: relative;
}
.menu-title{
font-size: 16px;
color: #fff;
font-weight: 500;
margin-bottom: 20px;
}
.contact-us{
justify-self: start;
color: var(--text-color-lightest);
}
.contact-us p:not(:first-child){
padding-bottom: 16px;
}
.menu-item li{
list-style: none;
padding-bottom: 8px;
}
.menu-item li a{
text-decoration: none;
font-weight: 300;
color:var(--text-color-lightest);
}
.icp-info{
margin-top: 24px;
margin-bottom: 16px;
}
.icp-info,
.rights{
grid-column: 1/-1;
justify-self: center;
color: white;
}
.scrollToTop a{
width: 32px;
height: 32px;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--primary-color);
color: white;
text-decoration: none;
position: fixed;
bottom: 30px;
right: 30px;
}
.scrollToTop{
display: none;
position: relative;
z-index: 300;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wyfsama/homePage_demo.git
git@gitee.com:wyfsama/homePage_demo.git
wyfsama
homePage_demo
homePage_demo
main

搜索帮助