一、HTML
<div
className='content'
style={{
width: '100%',
position: 'relative',
overflow: 'hidden',
height: `${fold ? '14.69rem' : '29.38rem'}`,
}}
>
<img
src={bottomBanner}
className='contentImg1'
style={{
display: `${fold ? 'block' : 'none'}`
}}
/>
<img
src={bottomBannerOpen}
className='contentImg2'
style={{
display: `${fold ? 'none' : 'block'}`
}}
/>
{
gameList?.map((item, index) => (
<GameList key={index} gemeItem={item} />
))
}
</div>
二、CSS
.content > .contentImg1 {
z-index: -1;
position: absolute;
width: 100%;
height: 14.69rem;
}
.content > .contentImg2 {
z-index: -1;
position: absolute;
width: 100%;
height: 29.38rem;
}
您已经阅读00:00:00欢迎留言评论,喜欢的话就为作者点个赞或者赏颗糖吧! 分享
发表评论(不少于3个字符) 取消回复