简体   繁体   English

如何更改幻灯片中的箭头?

[英]How to change arrows in slideshow?

I have auto-moving images as a slideshow.我有自动移动图像作为幻灯片。

Here's my code in CodePen: https://codepen.io/Krzysiek_39/pen/poNLbgx这是我在 CodePen 中的代码: https ://codepen.io/Krzysiek_39/pen/poNLbgx

On my code, instead of the left arrow, I have "previous" and instead of the right arrow I have "next".在我的代码中,我用“上一个”代替左箭头,用“下一个”代替右箭头。 Unfortunately, I don't like the round backgrounds with the words "previous" and "next".不幸的是,我不喜欢带有“上一个”和“下一个”字样的圆形背景。 Instead of the words "previous" (including the blue circular background) and the words "next" (including the red circular background) - I would like to have normal arrows (from another slideshow) in place of "previous" and "next".而不是“上一个”字样(包括蓝色圆形背景)和“下一个”字样(包括红色圆形背景)——我希望用普通箭头(来自另一个幻灯片)代替“上一个”和“下一个” .

Here is another slideshow with normal arrows: https://www.jqueryscript.net/demo/Responsive-Infinite-jQuery-Carousel-Slider-Plugin-LoopSlider/这是另一个带有普通箭头的幻灯片: https : //www.jqueryscript.net/demo/Responsive-Infinite-jQuery-Carousel-Slider-Plugin-LoopSlider/

Can I put these normal arrows (from another slideshow) in place of "previous" and "next"?我可以用这些普通箭头(来自另一个幻灯片)代替“上一个”和“下一个”吗?

An important issue!一个重要的问题! I would also like "cursor: pointer" to only work when hovering over these normal arrows.我还希望“光标:指针”仅在悬停在这些普通箭头上时才起作用。

I will be very grateful for effective help.我将非常感谢有效的帮助。

<div class="header">

    <div class="text">
        <a class="refresh" title="A website refresh">Website</a>
    </div>
    
</div>

<div class="menu-container">

    <div class="menu">
        <a>MENU</a>
    </div>
    
</div>
<div class="box">

    <div class="slider_wrapper">
    
        <div class="slider">
        
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?art" alt=""><span class="caption">Caption for slide 1</span></a>
            </div>
            
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?action" alt=""><span class="caption">Caption for slide 2</span></a>
            </div>
            
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?war" alt=""><span class="caption">Caption for slide 3</span></a>
            </div>
            
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?crime" alt=""><span class="caption">Caption for slide 4</span></a>
            </div>
            
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?drama" alt=""><span class="caption">Caption for slide 5</span></a>
            </div>
            
            <div class="slider_img_wrapper">
                <a href="#"><img src="https://source.unsplash.com/1600x900/?sci-fi" alt=""><span class="caption">Caption for slide 6</span></a>
            </div>
            
        </div>
        
        <div class="slider_objects">
        
            <div class="slider_btn prev_btn">previous</div>
            <div class="slider_btn next_btn">next</div>
            
            <ul class="slider_list_wrapper">
                <li class="slider_list active_slide"></li>
                <li class="slider_list"></li>
                <li class="slider_list"></li>
                <li class="slider_list"></li>
                <li class="slider_list"></li>
                <li class="slider_list"></li>
            </ul>
            
        </div>
        
    </div>
    
</div>

You can modify the styles to remove the round background and add HTML entity for the arrows:您可以修改样式以删除圆形背景并为箭头添加 HTML 实体:

HTML HTML

<div class="slider_btn prev_btn">&lsaquo;</div>
<div class="slider_btn next_btn">&rsaquo;</div>

CSS CSS

.prev_btn, .next_btn {
  font-size:4em;
  position: absolute;
  cursor: pointer;
  color: #ffffff;
  background:0;
}

.prev_btn {
  left: 50px;
}

.next_btn {
  right: 50px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM