// pc端: // 设计稿1440*900 所有尺寸基本按px来即可; // 正文 16px; // 移动端: // 设计稿宽800px,按逻辑尺寸的两倍制作。因此真实尺寸需要除2; // 如设计稿字体大小28px,则实真字体大小为28px/2=14px; // 或使用vw 字体大小:28/800*10 = 3.5vw // 正文 14px 或 3.5vw //pc端样式 .main { width: 100%; max-width: 1920px; margin: 0 auto; padding-top: 70px; .content{ width: 1500px; margin: 0 auto; .news_title{ text-align: center; padding-top: 143px; margin-bottom: 80px; .title{ font-weight: bold; font-size: 56px; color: #333333; } } .banner_box{ display: flex; justify-content: space-between; margin-bottom: 120px; .news_banner{ width: 750px; height: 512px; position: relative; img{ width: 100%; height: 100%; border-radius: 12px; } .news_content{ position: absolute; left: 0; bottom: 0; width: 100%; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%); color: #fff; padding: 218px 30px 40px; box-sizing: border-box; border-radius: 12px; .cont1{ font-weight: bold; font-size: 20px; } .cont2{ font-weight: 400; font-size: 16px; margin-top: 20px; } .cont3{ font-weight: 400; font-size: 14px; margin-top: 27px; } } } .news_banner2{ width: 340px; img{ width: 100%; height: 255px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; } .txt1{ font-weight: bold; font-size: 20px; color: #333333; line-height: 30px; padding-bottom: 20px; border-bottom: 1px solid #E7E7E7; margin-bottom: 20px; } .txt2{ font-size: 16px; color: #333333; margin-bottom: 20px; } .txt3{ font-size: 16px; color: #333333; margin-bottom: 18px; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 2; /* 限制显示的行数,这里是3行 */ overflow: hidden; /* 隐藏超出部分 */ text-overflow: ellipsis; /* 用省略号表示超出部分 */ } a{ font-size: 16px; color: #333333; display: flex; align-items: center; .icon{ transform: rotate(90deg); display: inline-block; color: #000000; font-size: 24px; margin-top: 5px; margin-left: 5px; } } } } .tabs_box{ width: 1300px; margin: 0 auto; font-weight: 400; font-size: 22px; display: flex; align-items: center; .tabs_li{ color: #231F20; margin-right: 80px; cursor: pointer; padding-bottom: 30px; transition: all .2s; border-bottom: 2px solid transparent; position: relative; &::after{ content: ""; width: 0; height: 2px; background: #B81C25; position: absolute; left: 0; bottom: -2px; right: 0; margin: auto; transition: all .4s ease; } &:hover{ color: #B81C25; &::after{ width: 100%; } } } .tabs_lis{ color: #B81C25; border-bottom: 2px solid #B81C25; } } } .news_ul{ width: 100%; max-width: 1920px; margin: 0 auto; background: #F6F6F6; display: none; .news_list{ width: 1300px; margin: 0 auto; .news_li{ display: flex; align-items: center; padding: 40px 0; border-bottom:1px solid #DADADA; transition: all .2s; .li_left{ width: 65px; height: 66px; border-radius: 8px; border: 1px solid #A7A5A5; text-align: center; font-size: 12px; padding: 0px 12px 0; box-sizing: border-box; margin-right: 30px; .timerData{ font-size: 26px; color: #b81c25; border-bottom: 1px solid #b81c25; padding-bottom: 3px; margin-bottom: 3px; line-height: 30px; padding-top: 4px; } } // .li_left{ // width: 66px; // height: 66px; // background: #F6F6F6; // border: 1px solid #A7A5A5; // display: flex; // align-items: center; // // justify-content: center; // flex-direction: column; // margin-right: 30px; // transition: all .5s; // border-radius: 8px; // span:nth-child(1){ // font-weight: 500; // font-size: 30px; // color: #B81C25; // } // span:nth-child(2){ // font-weight: 500; // font-size: 13px; // color: #231F20; // position: relative; // &::after{ // content: ''; // position: absolute; // top: -1px; // left: -8%; // height: 1px; // width: 120%; // background-color: #B81C25; // } // } // a{ // cursor: pointer; // } // } .li_cont{ font-weight: 400; transition: all .2s; div:nth-child(1){ font-weight: 500; font-size: 20px; color: #231F20; line-height: 30px; margin-bottom: 10px; transition: all .2s; } div:nth-child(2){ font-weight: 500; font-size: 16px; color: #A7A5A5; line-height: 30px; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 1; /* 限制显示的行数,这里是3行 */ overflow: hidden; /* 隐藏超出部分 */ } } &:hover{ background: #EFEFEF; .li_cont{ div:nth-child(1){ color: #B81C25; } } } &:last-child{ border: none; } } } } .newsShow{ display: block; } .news_paging{ width: 100%; display: flex; align-items: center; justify-content: center; padding: 100px 0 120px; background: #F6F6F6; box-sizing: border-box; .previousPage{ width: 40px; height: 40px; color: #000000; display: flex; align-items: center; justify-content: center; border: 1px solid #000000; margin-right: 20px; cursor: pointer; transition: all 0.2s; span{ font-size: 26px; transform: rotate(-90deg); } &:hover{ background: #B81C25; border: 1px solid #B81C25; color: #fff; } } .nextPage{ width: 40px; height: 40px; color: #000000; display: flex; align-items: center; justify-content: center; border: 1px solid #000000; margin-left: 20px; cursor: pointer; transition: all 0.2s; span{ font-size: 26px; transform: rotate(90deg); } &:hover{ background: #B81C25; border: 1px solid #B81C25; color: #fff; } } .pageNum{ min-width: 40px; height: 40px; line-height: 40px; font-size: 18px; color: #000; transition: all 0.2s; padding: 0 5px; box-sizing: border-box; cursor: pointer; text-align: center; border: 1px solid #DDE2E6; border-radius: 2px; &:hover{ background: #B81C25; border: 1px solid #B81C25; color: #fff; } } .pageNumActive{ color: #fff; background: #B81C25; } .pageNums{ pointer-events: none; } .pageNum+.pageNum{ margin-left: 10px; } .ellipsis{ font-weight: bold; font-size: 22px; padding: 10px 15px; color: #333333; // cursor: pointer; transition: all 0.2s; // &:hover{ // color:#48A038 // } } } } a{ display: inline-block; } @media screen and (min-width: 801px) and (max-width: 1400px) { .main{ .content{ width: calc(100% - 60px); .banner_box{ .news_banner{ width: 630px; height: 413px; .news_content{ border-radius: 12px; } } .news_banner2{ width: 300px; img{ height: 200px; } .txt1{ font-size: 16px; } .txt2{ font-size: 14px; } .txt3{ font-size: 14px; } a{ font-size: 14px; .icon{ margin-top: -2px; font-size: 18px; } } } } .tabs_box{ width: calc(100% - 60px); } } .news_ul { max-width: 100%; width: calc(100% - 60px); overflow: hidden; .news_list{ width: calc(100% - 60px); } } .news_paging{} } } @media screen and (min-width: 1400px) and (max-width: 1600px) { .main{ .content{ width: calc(100% - 60px); .banner_box{ .news_banner{ width: 690px; height: 455px; .news_content{ border-radius: 12px; } } .news_banner2{ width: 330px; img{ height: 200px; } .txt1{ font-size: 16px; } .txt2{ font-size: 14px; } .txt3{ font-size: 14px; } a{ font-size: 14px; .icon{ margin-top: -2px; font-size: 18px; } } } } .tabs_box{ width: calc(100% - 60px); } } .news_ul { max-width: 100%; width: calc(100% - 60px); overflow: hidden; .news_list{ width: calc(100% - 60px); } } .news_paging{} } } //移动端样式 @media screen and (max-width:800px) { .main { width: 100%; padding-top: 14.5vw; .content{ width: 92vw; margin: 0 auto; .news_title{ display: block; margin-bottom: 12.5vw; padding-top: 50px; .title{ font-size: 32px; text-align: center; } .title_screen{ margin-top: 10.625vw; .screen_li{ width: 44.625vw; height: 9.375vw; font-size: 3.5vw; .screen_box{ .screen_box_li{ font-size: 3.5vw; height: 8vw; line-height: 8vw; } } svg{ width:5.5vw; height: 4vw; } } } } .banner_box{ display: block; margin-bottom: 15vw; .news_banner{ width: 100%; height: auto; margin-bottom: 8vw; img{ width: 100%; height: 62.75vw; border-radius: 1.625vw; object-fit: cover; } .news_content{ padding: 3.75vw; display: flex; flex-wrap: wrap; flex-direction: column-reverse; .cont1{ font-weight: bold; font-size: 3.75vw; color: #fff; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 2; /* 限制显示的行数,这里是3行 */ overflow: hidden; /* 隐藏超出部分 */ text-overflow: ellipsis; /* 用省略号表示超出部分 */ } .cont2{ width: 100%; font-size: 3.375vw; color: #fff; margin-bottom: 2.5vw; } .cont3{ font-size: 3.25vw; color: #fff; } } } .news_banner2{ width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10.75vw; img{ width: 45.375vw; height: 34vw; margin-bottom: 0; border-radius: 1.625vw; } .banner2_cont{ width: 42.5vw; } .txt1{ width: 42.5vw; font-size: 3.75vw; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 2; /* 限制显示的行数,这里是3行 */ overflow: hidden; /* 隐藏超出部分 */ text-overflow: ellipsis; line-height: 1.5; padding-bottom: 0; margin-bottom: 5.375vw; border: 0; } .txt2{ margin-bottom: 5.5vw; font-size: 3.25vw; color: #999999; } .txt3{ display: none; } a{ font-size: 3.325vw; .icon{ font-size: 4.325vw; margin-top: 0; } } } } .tabs_box{ width: 100%; font-size: 3.75vw; display: flex; align-items: center; justify-content: space-between; .tabs_li{ margin-right: 0; padding-bottom: 5.625vw; } } } .news_ul{ width: 100%; .news_list{ margin-top: 0; width: 100%; box-sizing: border-box; padding: 0 3.75vw; .news_li{ padding:5.625vw 0; display: flex; align-items: center; justify-content: space-between; .li_left{ width: 16.25vw; margin-right: 0; } .li_cont{ width: 71.5vw; div:nth-child(1){ font-size: 3.75vw; color: #282828; line-height: 7.5vw; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 1; /* 限制显示的行数,这里是3行 */ overflow: hidden; font-weight: bold; } div:nth-child(2){ width: auto; height: auto; overflow: unset; line-height: 1.5; font-size: 3.25vw; color: #A7A5A5; padding: 0; display: -webkit-box; /* 使用 Flexbox 布局 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ -webkit-line-clamp: 2; /* 限制显示的行数,这里是3行 */ overflow: hidden; } } } } } .news_paging{ padding-top: 16vw; .previousPage{ width: 40px; height: 40px; margin-right: 20px; box-sizing: border-box; } .nextPage{ width: 40px; height: 40px; margin-left: 3.25vw; transition: all 0.2s; box-sizing: border-box; } .pageNum{ font-size: 3.5vw; } .ellipsis{ font-size: 3.5vw; padding: 1.875vw 2.5vw; // &:hover{ // color:#48A038 // } } } } }