Необычный срезанный вид материалов на CSS3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
.container { max-width: 400px; width: 100%; margin: 0 auto; padding-bottom: 70px; position: relative; } .container * { box-sizing: border-box; } .container .intro { position: relative; min-height: 300px; height: 100%; width: 100%; overflow: hidden; transition: all .72s ease-in-out; } .container .intro:after { content: ''; display: block; position: absolute; /* width: 100%; */ height: 500px; right: -100%; left: 0; transform: skew(100deg); background: #fff; bottom: -70%; box-shadow: inset 1px 0px 5px 0px rgba(204, 204, 204, 0.72); } .container .meta { max-width: 300px; width: 100%; margin: 0% auto 0; position: absolute; left: 0; bottom: 0; right: 0; z-index: 10; padding-top: 110px; overflow: hidden; transition: all .52s ease-in-out; } .container .meta__inner { padding: .25rem 1rem; line-height: 1.5rem; position: relative; background: #fff; z-index: 15; background: #fff; border: 1px solid #ccc; border-top: none; } .container .meta:after { content: ''; display: block; position: absolute; left:0; right: 0; top: 80px; max-width: 300px; height: 300px; background: #fff; border: 1px solid #ccc; transform: rotate(90deg) skew(10deg); z-index: 4; } .container h3 { position: relative; font-family: sans-serif; font-weight: 300; border-left: 4px solid tomato; padding-left: .72rem; } .container p { font-family: serif; font-size: .85rem; font-weight: inherit; color: #555; text-align: justify; } .container p a { color: tomato; text-decoration: none; opacity: .72; transition: all .27s ease-in-out; } .container p a:hover { opacity: 1; text-decoration: underline; } .container:hover .meta{ transform: translateY(5px); } .container:hover .intro { transform: translateY(-5px); } |
1 2 3 4 5 6 7 8 9 |
<div class="container"> <section class="intro" style="background: transparent url(ССЫЛКА_НА_КАРТИНКУ) top center no-repeat;background-size: 100%;"></section> <div class="meta"> <div class="meta__inner"> <h3>Заголовок</h3> <p>Здесь любой ваш текст <a href="#">Читать далее...</a></p> </div> </div> </div> |