Files
coreality-inc/public/assets/css/banner.css
ericli1018 6dfe3e0677 release
2025-06-13 12:24:35 +08:00

335 lines
7.7 KiB
CSS

/*========================================================
首頁 carousel-intro
=========================================================*/
/* 首頁 carousel-intro */
.carousel-intro {
position: relative;
}
.carousel-intro .carousel-item {
position: relative;
}
/* 文字 */
.carousel-intro .carousel-caption {
position : absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 9;
color: #fff;
text-align: center;
padding: 15px 0;
width: 70%;
}
.carousel-intro .carousel-caption h2 {
display: inline-block;
color: #fff;
font-size: 1.3rem;
/* text-shadow: 1px 1px 1px #fff;*/
font-weight: bold;
margin: 0 0 20px 0;
padding: 0;
line-height: 28px;
}
.carousel-intro .carousel-caption p {
color: #fff;
font-size: 1rem;
/* text-shadow: 1px 1px 1px #333; */
font-weight: normal;
margin: 0 0 20px 0;
padding: 0;
line-height: 18px;
}
.carousel-intro .carousel-caption a {
display: inline-block;
background: linear-gradient(to bottom, #2fe49e 0%,#2087a3 100%);
color: #fff;
padding: 2px 30px;
border-radius: 15px;
font-size: 0.7rem;
line-height: 20px;
}
.carousel-intro .carousel-caption a:hover {
background: linear-gradient(to bottom, #24afc0 0%,#1f68a4 100%);
}
/*========================================================
按鈕設定
=========================================================*/
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: 30px;
height: 30px;
background: rgba(255,255,255,0.3) no-repeat center center;
background-size: 50% 50%;
border-radius: 50%;
}
.carousel-control-prev-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e");
}
.carousel-control-next-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e");
}
.carousel-indicators li {
/*
width: 15px;
background-color: #fff;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
opacity: 1;
border-radius: 50%;
*/
opacity: 1;
height: 5px;
}
.carousel-indicators .active {
opacity: 1;
background-color: #e27a14;
}
.caption-img {
text-align: center;
}
/*========================================================
動畫設定
=========================================================*/
@-webkit-keyframes animatedBackground {
0% {transform: scale(1.0);}
100% {transform: scale(1.1);}
}
@-o-keyframes animatedBackground {
0% {transform: scale(1.0);}
100% {transform: scale(1.1);}
}
@-moz-keyframes animatedBackground {
0% {transform: scale(1.0);}
100% {transform: scale(1.1);}
}
@keyframes animatedBackground {
0% {transform: scale(1.0);}
100% {transform: scale(1.1);}
}
/* 只設定電腦版有效果 */
/*
.carousel-intro img {
animation: animatedBackground 12s infinite alternate;
-moz-animation: animatedBackground 12s infinite alternate;
-webkit-animation: animatedBackground 12s infinite alternate;
-ms-animation: animatedBackground 12s infinite alternate;
-o-animation: animatedBackground 12s infinite alternate;
}
*/
/*========================================================
尺寸設定
=========================================================*/
@media (max-width: 479px) {
.carousel-intro .carousel-item > img {
height: 420px;
}
.carousel-intro .carousel-caption p {
display: none;
}
}
@media (min-width: 480px) and (max-width: 767px) {
.carousel-intro .carousel-item > img {
height: 600px;
}
}
@media (max-width: 767px) {
.carousel-intro .carousel-item > img {
object-fit: cover;
object-position: center center;
}
.caption-img img {
max-width: 50%;
max-height: 45%;
margin-top: 30px;
}
}
@media (min-width: 768px) {
.carousel-intro .carousel-caption {
text-align: left;
}
.carousel-intro .carousel-caption h2 {
font-size: 1.4rem;
line-height: 28px;
}
.carousel-intro .carousel-caption p {
font-size: 1rem;
line-height: 20px;
}
.carousel-intro .carousel-caption a {
padding: 10px 30px;
border-radius: 30px;
}
.caption-img img {
max-height: 60vh;
}
}
@media (min-width: 992px) {
.carousel-intro .carousel-caption {
width: 70%;
}
.carousel-intro .carousel-caption h2 {
font-size: 1.6rem;
line-height: 30px;
}
.carousel-intro .carousel-caption p {
font-size: 0.9rem;
line-height: 24px;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
width: 40px;
height: 40px;
}
}
@media (min-width: 1200px) {
.carousel-intro .carousel-caption h2 {
font-size: 1.8rem;
line-height: 36px;
}
.carousel-intro .carousel-caption p {
font-size: 1rem;
line-height: 24px;
}
}
@media (min-width: 1600px) {
.carousel-intro .carousel-caption {
width: 70%;
}
.carousel-intro .carousel-caption h2 {
font-size: 2rem;
line-height: 40px;
}
.carousel-intro .carousel-caption p {
font-size: 1.1rem;
line-height: 28px;
}
.carousel-indicators {
bottom: 5%;
}
}
/*========================================================
內頁banner設定
=========================================================*/
.page-banner {
position: relative;
overflow: hidden;
}
.page-banner img {
width: 100%;
vertical-align: bottom;
/* animation: animatedBackground 12s infinite alternate;
-moz-animation: animatedBackground 12s infinite alternate;
-webkit-animation: animatedBackground 12s infinite alternate;
-ms-animation: animatedBackground 12s infinite alternate;
-o-animation: animatedBackground 12s infinite alternate;*/
}
.page-banner-caption {
position : absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9;
color: #fff;
text-align: center;
width: 100%;
}
.page-banner-caption h2 {
color: #fff;
font-size: 2rem;
text-shadow: 1px 1px 2px #666, 1px 1px 2px #666;
font-weight: 600;
margin: 0;
padding-bottom: 15px;
line-height: 30px;
font-family: 'Noto Serif TC', serif;
}
.page-banner-caption p {
color: #fff;
font-size: 1.1rem;
text-shadow: 1px 1px 2px #666, 1px 1px 2px #666;
font-weight: normal;
margin: 0;
padding: 0;
line-height: 16px;
font-family: Arial, "微軟正黑體", Verdana, Helvetica, sans-serif;
}
@media (max-width: 767px) {
.page-banner > img {
height: 320px;
}
}
@media (min-width: 768px) and (max-width: 1023px) {
.page-banner > img {
height: 400px;
}
}
@media (max-width: 991px) {
.page-banner > img {
object-fit: cover;
}
}
@media (min-width: 992px) {
.page-banner-caption {
left: 16vw;
transform: translateY(-50%);
z-index: 9;
text-align: left;
}
.page-banner-caption h2 {
font-size: 1.8rem;
padding-bottom: 5px;
}
.page-banner-caption p {
font-size: 1rem;
}
}
@media (min-width: 1200px) {
.page-banner-caption h2 {
font-size: 2.2rem;
padding-bottom: 10px;
}
.page-banner-captionp {
font-size: 1.1rem;
}
}
@media (min-width: 1600px) {
.page-banner-caption h2 {
font-size: 2.6rem;
padding-bottom: 15px;
}
.page-banner-caption p {
font-size: 1.2rem;
}
}