Tengo una tarjeta de diseño de materiales que inicialmente es horizontal en la vista de escritorio. El problema es que tengo una gran cantidad de texto en el contenido de la tarjeta . Entonces, en el móvil, la imagen a la izquierda de la tarjeta horizontal permanece pequeña y el texto grande expande la tarjeta, lo que parece extraño.

<div class="card horizontal">
    <div class="card-image">
      <img src="src/lib/svg/undraw_science_fqhl.png">
    </div>
    <div class="card-stacked">
      <div class="card-content">
       <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
    </div>
    <div class="card-action">
     <a href="#">This is a link</a>
    </div>
  </div>
</div>

enter image description here

Lo que quiero es hacer esto horizontal es cambiar a tarjeta vertical en el móvil así:

enter image description here

¿Cómo puedo resolver este problema?

1
Shunjid Rahman 13 oct. 2019 a las 16:31

1 respuesta

La mejor respuesta

Necesitas usar materializar cuadrícula con la tarjeta:

A continuación se muestra su solución de código: Código

Materializar la documentación de la tarjeta

<div class="row">
    <div class="col s12 m7">
        <div class="card">
            <div class="card-image">
                <img src="images/sample-1.jpg">
                <span class="card-title">Card Title</span>
            </div>
            <div class="card-content">
                <p>I am a very simple card. I am good at containing small bits of information.
                I am convenient because I require little markup to use effectively.</p>
            </div>
            <div class="card-action">
                <a href="#">This is a link</a>
            </div>
        </div>
    </div>
</div>

2
Pibben 15 oct. 2019 a las 10:31