.banner { width: 100%; position: relative; display: flex; overflow: hidden; height: 450px; justify-content: center; align-items: center; } .banner *{ transition: all .4s; } .banner .imgBox{ width: 100%; height: 100%; position: absolute; left: 0; top: 0; } .banner:hover .imgBox > img{ left: -20px; top: -20px; max-width: calc(100% + 40px); width: calc(100% + 40px); height: calc(100% + 40px); } .banner-con{ position: relative; padding: 15px 30px; display: flex; justify-content: center; flex-direction: column; margin-top: 100px; } .bg-absolute{ position: absolute; filter: blur(5px); background-image: linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,0.5) 60% ); color: #b9b7b7; } .banner-con > span{ width: 420px; font-size: 2.5em; color: white; font-weight: bold; cursor: default; display: flex; justify-content: center; } .banner:hover .banner-con > span{ font-size: 2.6em; } .banner-con > .subTitle{ font-size: 2em; } .banner:hover .banner-con > .subTitle{ font-size: 1.9em; } .banner-con .search-box{ width: 100%; display: flex; justify-content: center; } .banner-con .search{ width: 340px; height: 40px; margin-top: 10px; /*background-color: #fff;*/ box-shadow: 1px 1px 6px 4px #22b3e5; border-radius: 40px; cursor: pointer; overflow: hidden; position: relative; } .banner:hover .banner-con .search{ width: 400px; border: 1px solid #ffffff; } .banner-con .search > *{ display: block; } .banner-con .search-box .search input{ width: 100%; height: 100%; border-radius: 40px; outline: #22b3e5; BACKGROUND-COLOR: transparent; padding-left: 15px; color: #b4b4b4; } .banner-con .search-box .search button{ display: block; width: 40px; height: 40px; position: absolute; right: 0; top: 0; color: white; font-size: 1.4em; } .banner-con .search-box .search button:hover{ font-size: 1.6em; color: orangered; }