/* 超小屏幕(手机,小于 768px) */ /* 没有任何媒体查询相关的代码,因为这在 Bootstrap 中是默认的(还记得 Bootstrap 是移动设备优先的吗?) */ * { font-size: 14px; } @font-face { font-family: 'Futura Heavy'; src: url('../fonts/Futura-Book-2.ttf'); } body { font-family: 'Futura Heavy'; } .marginTop10 { margin-top: 10px; } .marginTop20 { margin-top: 100px; } /*index页面css*/ #index-page .main-part .title-part { display: flex; justify-content: center; } #index-page .main-part .title-part span { display: inline-block; padding: 4px 10px; font-weight: bold; } #index-page .main-part .title-part .title { font-size: 16px; color: #fff; background: rgba(51, 51, 51, 0.8); border-radius: 2px; letter-spacing: 6px; } #index-page .main-part .contributor-part { padding: 60px 24px; overflow: hidden; } #index-page .main-part .introduce-part { width: 100%; display: flex; padding: 60px 24px; background: rgba(232, 186, 188, 0.6); } #index-page .main-part .introduce-part .ip-left { margin-bottom: 24px; margin-right: 12px; display: flex; justify-content: center; align-items: center; } #index-page .main-part .introduce-part .ip-left img { width: 430px; height: 370px; } #index-page .main-part .introduce-part .ip-right p { text-indent: 0; font-size: 18px; } #index-page .main-part .introduce-part .content { width: 100%; margin: 12px auto; } #index-page .main-part .introduce-part .content p { text-indent: 28px; line-height: 24px; } #index-page .main-part .gain-part { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 80px 120px; background: rgba(232, 186, 188, 0.6); } #index-page .main-part .gain-part .data-item { width: 250px; padding: 24px; border-radius: 4px; text-align: center; } #index-page .main-part .gain-part .data-item p { line-height: 34px; font-size: 18px; } #index-page .main-part .gain-part .data-item span { display: inline-block; font-size: 100px; } #index-page .main-part .gain-part .data-item span small { font-size: 30px; font-weight: bold; } .course-part { width: 100%; padding: 60px 24px; } .course-part h3 { text-align: center; } .course-part .course-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; } .course-part .course-wrap .course-item { width: 30%; min-width: 350px; height: 360px; border-radius: 6px; background: #fff; box-shadow: 5px 5px 25px 0px rgba(46, 61, 73, 0.2); margin: 12px; overflow: hidden; } .course-part .course-wrap .course-item .title { width: 100%; height: 140px; padding: 24px; background: #333; } .course-part .course-wrap .course-item .title h4 { color: #fff; font-size: 26px; } .course-part .course-wrap .course-item p { height: 120px; padding: 24px; display: flex; align-items: center; } .course-part .course-wrap .course-item .enter-wrap { text-align: center; } .course-part .course-wrap .course-item .enter-wrap a { display: inline-block; height: 44px; line-height: 44px; width: 140px; margin: 0 auto; border-radius: 4px; background: #e8babc; text-align: center; color: #fff; font-size: 16px; text-decoration: none; } .course-part .course-wrap .course-item .enter-wrap a a, .course-part .course-wrap .course-item .enter-wrap a a:hover { color: #fff; text-decoration: none; } .nav-list { visibility: hidden; z-index: 99; } .slider-part .slider-item { position: relative; } .slider-part .slider-item .top-content { position: absolute; z-index: 2; top: 10vh; left: 26vh; color: #fff; } .slider-part .slider-item .top-content h3 { font-size: 8rem; } .slider-part .slider-item .top-content p { font-size: 4rem; } footer { height: 42px; line-height: 42px; background: #333; text-align: center; color: #fff; } footer span { display: inline-block; font-size: 13px; margin-right: 10px; } footer a { color: #fff; font-size: 13px; } footer a:hover { color: #fff; } .swiper-slide { width: 100%; } .swiper-slide span { display: inline-block; font-size: 24px; } .fix-donation { position: fixed; top: 44vh; right: 0; z-index: 99; width: 48px; background: #333; } .fix-donation a { display: inline-block; padding: 14px; } .fix-donation a, .fix-donation a:hover { color: #fff; text-decoration: none; font-size: 17px; } /* 小屏幕(平板,大于等于 768px) */ @media (max-width: 768px) { .content-detail { display: none; } .navbar { border-radius: 0px; } .carousel-caption { display: none; } .introduce-part { width: 100%; flex-direction: column; } .introduce-part .ip-left, .introduce-part .ip-right { width: 100%; margin: 0 auto; margin-right: 0; } .introduce-part .ip-left img, .introduce-part .ip-right img { width: 90% !important; } .gain-part { flex-direction: column; padding: 80px 20vw !important; } .slider-part .slider-item { position: relative; } .slider-part .slider-item .top-content { position: absolute; z-index: 2; top: 7vh; left: 7vh; color: #fff; } .slider-part .slider-item .top-content p { font-size: 2rem; } } /* 中等屏幕(桌面显示器,大于等于 992px) */ @media (max-width: 992px) and (min-width: 769px) { .main-part { width: 960px; margin: 0 auto; } } /* 大屏幕(大桌面显示器,大于等于 1200px) */ @media (min-width: 1200px) { .main-part { padding: 60px; } .introduce-part { display: flex; flex-direction: row; justify-content: center; } .introduce-part .ip-right { width: 30%; margin-left: 8vw; } }