* {box-sizing:border-box} /* Slideshow container */ .slideshow-container { max-width: 1000px; position: relative; margin: auto; } /* Hide the images by default */ .mySlides { display: none; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; color: white; font-weight: bold; font-size: 24px; transition: all 0.3s ease; border-radius: 50%; user-select: none; background-color: rgba(0, 0, 0, 0.5); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, 0.7); z-index: 2; } /* Position the "next button" to the right */ .next { right: 15px; } /* On hover, add a black background color with a little bit see-through */ .prev:hover, .next:hover { background-color: rgba(0, 0, 0, 0.8); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); border-color: white; width: 55px; height: 55px; } /* Caption text */ .text { color: #ffffff; background-color: #0000006a; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { cursor: pointer; height: 15px; width: 15px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active, .dot:hover { background-color: #717171; } /* Fading animation */ .fade { animation-name: fade; animation-duration: 1.5s; } @keyframes fade { from {opacity: .4} to {opacity: 1} } /* 箭头图标本身的样式 */ .prev:after, .next:after { content: ''; display: block; width: 12px; height: 12px; border: solid white; border-width: 3px 3px 0 0; } .prev:after { transform: rotate(-135deg); margin-left: 5px; } .next:after { transform: rotate(45deg); margin-right: 5px; } /* 可以添加一些投影让箭头更明显 */ .prev, .next { text-shadow: 0 0 3px rgba(0,0,0,0.3); box-shadow: 0 0 5px rgba(0,0,0,0.2); }