javascript - 反应轮播预览
问题描述
代码
const settings = {
showArrows: false,
swipeable: true,
stopOnHover: true,
autoPlay: true,
infiniteLoop: true,
transitionTime: 1000,
showIndicators: false,
useKeyboardArrows: true,
emulateTouch: true,
showThumbs: false,
}
return (
<Carousel {...settings}>
<div className="about-banner-one">
<div className="about-banner-content">
<img className="about-image" alt="" src={image1}/>
</div>
...
</div>
</Carousel>
的CSS
.about-image{
width: 100vw !important;
height: 60vh !important;
}
.about-banner-one{
padding: 0;
height: 60vh;
/* background-image: linear-gradient(to right, rgba(0, 0, 0, 0.955), rgba(0, 0, 0, 0.784)), url(../../../assets/cargoplane\ 2.jpg); */
background-attachment: fixed;
background-size: cover;
background-position: bottom;
position: relative;
bottom: 20px;
width: 100vw;
}
...
我曾尝试将 div 的背景图像(解释不同的 div 名称)放在 css 中,但图像不会显示。如何摆脱以前突出显示的图像?
我如何进行过渡?
解决方案
推荐阅读
- html - 基于类而不是 id 连接到链接的锚标记
- javascript - 如何避免跳过第二个数组中的数组索引?
- python - Django Rest Framework - 一对多关系不起作用
- spring - Spring Boot、Elasticsearch 6.2.4、Gradle 依赖问题
- reactjs - 如何测试 React 道具中的 html 按钮?
- adobe-xd - Adobe XD Apple UI 资源
- python - 如何在我的 pybuilder 脚本中使用源代码方法?
- excel - 基于当前工作簿中单元格(日期)的 Excel 外部引用
- python - Python中文本文件的排行榜
- java - 为什么我不能在 java 中同时使用 STDdraw 和 STDAudio 类?