Skip to content

Full Screen with text #445

Answered by NaotoshiFujita
timsun28 asked this question in Q&A
Discussion options

You must be logged in to vote

The easiest way is using the cover option:

<div id="your-slider" class="splide">
  <div class="splide__track">
    <ul class="splide__list">
      <li class="splide__slide">
        <img src="image.jpg" alt="...">
        <p>Text text text</p> 
      </li>
    </ul>
  </div>
</div>

<script>
var splide = new Splide( '#your-slider', { 
  width: '100vw',
  height: '100vh',
  cover: true,
} );
</script>

Without the option, you can use absolute and z-index for texts just like a normal CSS way.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@timsun28
Comment options

Answer selected by timsun28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants