Ninja Slider / Posts /

Using the HTML5 picture element and srcset attibutes

0

Can I use the HTML5 picture element and the srcset attribute with Ninja slider in order to replace the sliding images with a fixed image for mobile phone screens? If so can you explain how without creating a separate URL?

Vermonte  2 years ago   viewed: 1523    

1 Answer

0

I think you can try:

<img class="ns-img" src="1.jpg" srcset="portrait-small.jpg 1x, portrait-large.jpg 2x">

I never tried it so please try it out by yourself to confirm.

John   2 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: