加载页面时叠加文本(Text overlay when loading the page)

编程入门 行业动态 更新时间:2024-10-21 16:35:43
加载页面时叠加文本(Text overlay when loading the page)

我在滑块中添加了一个段落。

<div> <a> <img src="image.jpg"/> <p>Some texts</p> </a> <div>

段落显示在图像的顶部。完成加载整个页面后,滑块工作正常。 但是,当页面加载时,我可以在同一时间看到每个幻灯片的所有段落。 我只希望它在加载时显示第一个幻灯片段落。 有人可以帮忙吗?

I have added a paragraph in the slider.

<div> <a> <img src="image.jpg"/> <p>Some texts</p> </a> <div>

The paragraph is display on top of the image.The slider works fine after finishing loading the whole page. However, when the page is loading, I can see all of the paragraph for each slide show in the same time. I only want it shows the first slide paragraph when loading. Can anyone please help?

最满意答案

您只能在一开始时显示一张幻灯片并隐藏所有其他幻灯片(通过指定style="display: none;" )。

<div u="slides" ...> <div> <a> <img src="image.jpg"/> <p>Some texts</p> </a> <div> <div style="display: none;"> ... <div> </div>

或者您可以使用jssor slider no-jquery版本,它会立即初始化jssor滑块而无需等待页面加载。

You can display only one slide and hide all other slides (by specifying style="display: none;") at the beginning.

<div u="slides" ...> <div> <a> <img src="image.jpg"/> <p>Some texts</p> </a> <div> <div style="display: none;"> ... <div> </div>

Or you can use jssor slider no-jquery version, it will initialize jssor slider immediately without waiting for page load.

更多推荐

本文发布于:2023-08-07 00:41:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458523.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   文本   页面   Text   loading

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!