我想从Trullia帖子中得到图片,它们都是通过具有背景图片的类名分配给div的。 我该怎么办?你知道吗
.kMqQpn {
background-image: url(https://www.trulia.com/pictures/thumbs_6/zillowstatic/ISukfi6equ5pf41000000000.jpg);
background-color: rgb(0, 0, 0);
background-size: contain;
height: 100%;
display: flex;
background-repeat: no-repeat;
background-position: center center;
flex: 1 1 0%;
}
<div class="SlideWrapper__Container-sc-8vknhi-0 ekTitK"><div data-testid="media-carousel-image-0" class="MediaCarouselSlide__MediaCarouselImage-vvght3-0 kMqQpn"></div></div>
您可以看到,inner div是动态更改类名的,所以获取背景图像的解决方案是什么。 谢谢
您可以使用css selector:
相关问题 更多 >
编程相关推荐