hint
/
style.css
144 строки · 4.2 Кб
1* {2-webkit-box-sizing: border-box;3box-sizing: border-box;4}
5
6body {7display: -webkit-box;8display: -ms-flexbox;9display: flex;10-ms-flex-pack: distribute;11justify-content: space-around;12-webkit-box-align: center;13-ms-flex-align: center;14align-items: center;15-ms-flex-wrap: wrap;16flex-wrap: wrap;17gap: 40px;18width: 100vw;19height: 100vh;20margin: 0;21padding: 40px;22background-color: #2c2;23font-family: sans-serif;24}
25
26.hint {27position: relative;28width: 400px;29height: 400px;30padding: 200px;31margin: auto;32border-radius: 50%;33background-color: rgba(255, 255, 255, 0.1);34-webkit-transition: padding 0.5s ease-in-out;35transition: padding 0.5s ease-in-out;36}
37.hint.first .hint__inner {38background: center/cover no-repeat url("https://sun9-49.userapi.com/impg/WlJXmdYlZ5ObA4qdxUDDRpCpk4gPuNEbgB_s7w/WhpsC7bqr0k.jpg?size=1920x1080&quality=95&sign=ef7d5ec2d6173d3e86fa81a031333efe&type=album");39}
40.hint.first::before {41content: "IMAGE 1";42}
43.hint.second .hint__inner {44background: center/cover no-repeat url("https://sun9-38.userapi.com/impg/RoVw9lQ-F_BR9aPw4z3SeGMTPzPGFuPuiV1omw/6iSzJoRV4jE.jpg?size=1080x1080&quality=95&sign=837d710a810ca08829794aaa70c8a5d1&type=album");45}
46.hint.second::before {47content: "IMAGE 2";48}
49.hint.third .hint__inner {50background: center/cover no-repeat url("https://sun9-44.userapi.com/impg/1cTR6tNpRYVRzO6ny2vxmWw_RVwtEPSN-U-GtQ/PMdirb-ViSo.jpg?size=1400x1400&quality=95&sign=d21b8c74bc322ebe93d5e4c94b880f05&type=album");51}
52.hint.third::before {53content: "IMAGE 2";54}
55.hint::before {56content: "";57position: absolute;58left: 0;59right: 0;60top: 0;61line-height: 400px;62text-align: center;63z-index: -1;64}
65.hint__close {66cursor: pointer;67position: absolute;68top: 30%;69left: 30%;70display: -ms-grid;71display: grid;72place-content: center;73background: #000;74color: #fff;75border: none;76border-radius: 50%;77width: 40px;78height: 40px;79font-size: 30px;80-webkit-transform: scale(0) rotate(360deg);81transform: scale(0) rotate(360deg);82-webkit-transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), -webkit-transform 0.5s;83transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), -webkit-transform 0.5s;84transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s;85transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s, -webkit-transform 0.5s;86-webkit-box-shadow: 0 0.15em 0.25em rgba(0, 0, 0, 0.3);87box-shadow: 0 0.15em 0.25em rgba(0, 0, 0, 0.3);88}
89.hint__inner {90width: 100%;91height: 100%;92overflow: hidden;93border-radius: 50%;94border: 0 solid white;95-webkit-box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.3);96box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.3);97background-color: #bbb;98-webkit-transition: padding 0.5s ease-in-out, border-width 0.25s;99transition: padding 0.5s ease-in-out, border-width 0.25s;100}
101.hint__inner img {102position: relative;103width: 100%;104-webkit-transition: top 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1), -webkit-transform 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1);105transition: top 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1), -webkit-transform 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1);106transition: transform 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1), top 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1);107transition: transform 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1), top 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1), -webkit-transform 0.5s 0.2s cubic-bezier(0.25, 1, 0.5, 1);108}
109.hint:hover {110padding: 0;111}
112.hint:hover .hint__inner {113border-width: 0.5em;114}
115.hint:hover .hint__close {116top: 11%;117left: 11%;118-webkit-transform: scale(1);119transform: scale(1);120}
121.hint__show {122padding: 0;123}
124.hint__show .hint__inner {125border-width: 0.5em;126}
127.hint__show .hint__close {128top: 11%;129left: 11%;130-webkit-transform: scale(1);131transform: scale(1);132}
133
134@media (max-width: 920px) {135.hint {136width: 300px;137height: 300px;138padding: 150px;139}140.hint::before {141content: "";142line-height: 300px;143}144}