.modular1 { padding: 5% 0; } .modular1 .left { width: 469px; position: absolute; } .modular1 .wrap { position: relative; } .modular1 .left img { width: 100%; } .modular1 .left .text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #Fff; width: 100%; text-align: left; padding: 2em; } .modular1 .left .text h1 { line-height: 1em; margin-bottom: 0.2em; font-weight: bold; } .modular1 .left .text h2 span { color: #4b95fe; } .modular1 .right { margin-left: 469px; min-height: 180px; padding: 1em 4em; color: #888; line-height: 1.8; } .modular1 .right h3 { margin-bottom: 1em; font-weight: bold; color: #555; } .modular2 .wrap li { position: relative; overflow: hidden; } .modular2 .left, .modular2 .right { width: 50%; float: left; } .modular2 .right { position: absolute; left: 50%; height: 100%; padding: 5%; background: #f7f7f7; } .modular2 .right h1 { font-weight: bold; color: #4b95fe; margin-bottom: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .modular2 .right p { line-height: 2em; height: 70%; overflow: hidden; } .modular2 li:nth-child(2n-1) .right { left: 0; } .modular2 li:nth-child(2n-1) .left { float: right; } .modular2 .left img { width: 100%; transition: all .3s; } .modular3 { padding: 5% 0; } .modular3 .wrap { background: center center no-repeat; background-size: cover; position: relative; } .modular3 .wrap .text { color: #fff; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; line-height: 2em; height: 6em; } .modular3 .wrap img { width: 100%; } @media only screen and (min-width: 768px) { .modular2 .left:hover img { transform: scale(1.1); } } @media only screen and (max-width: 768px) { .modular3 .wrap img { display: none; } .modular3 .wrap .text { position: relative; left: 0; top: 0; transform: none; width: 100%; padding: 5% 10%; height: auto; } .modular1 .left { position: relative; width: 100%; } .modular1 .right { margin-left: 0; padding: 3em 1em; } .modular2 li:nth-child(2n-1) .left, .modular2 .left, .modular2 .right { width: auto; position: relative; float: none; left: 0; } .modular2 .right { padding: 3em; } .modular2 .right p { height: auto; } }