Ver ❯
Herramientas SEO
Tamaño del resultado:
668 x 574
×
Cambiar Orientacion
Cambiar tema, Oscuro/Luz
<!doctype html> <html lang="es"> <head> <meta charset="utf-8"> <title>Trucos y efectos de CSS3 - Tutoriales En Linea</title> </head> <body> <style> main { width: 100%; padding: 39px 29px; font-size: 12px; } section { width: 100%; box-shadow: 0 0 0 1px #eeeeee; display: flex; overflow: hidden; } section > span { width: 20%; padding: 12px; align-self: center; } .left { width: 45%; display: flex; flex-direction: column; padding-bottom: 0; } .center { width: 35%; padding-top: 999px; /* h */ padding-bottom: 999px; /* a */ margin-top: -999px; /* c */ margin-bottom: -999px; /* k */ border: 1px solid #eee; } .left .item { text-align: center; line-height: 85px; background: rgba(180,160,120,.1); position: relative; margin-bottom: 12px; } </style> <main class="main"> <section> <span class="left"> <div v-for="ele in elements" @click="handleClick" class="item"> {{symbol}} </div> </span> <span class="center">vertical centering<br>vertical centering</span> <span class="right">vertical centering</span> </section> </main> <script> export default { data () { return { elements: Array(2).fill(1), symbol: '➕' } }, methods: { handleClick () { this.elements.length == 2 ? (_ => { this.elements.push(1); this.symbol = '➖'; })() : (_ => { this.elements.pop(); this.symbol = '➕'; })() } } } </script> </body> </html>