如何通过div :: before获取图像?

时间:2019-07-01 13:16:15

标签: css

::before隐藏的图像: Image hidden by ::before

.footer::before {
display: block;
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
width: 0;
height: 0;
background: none;
border-bottom: 5vw solid transparent;
border-left: 100vw solid #ffffff;
z-index: 0;}

要获得类似三角形的形状,我将左边框的边框设为白色。 但我想要像

我希望图像如何显示:

How I want image to be

但是它隐藏在:: before

之后
 img {
z-index: 10;
margin: 5px;}

如何在:: before的边界上方获取图像?

脚是

 .footer {
height: 200px;
width: 100%;
left: 0;
background-image: linear-gradient(-315deg, #53BF9D 48%, #195CA0);
position: absolute;
bottom: 0;}

HTML

    <div class="footer">
    <img src="logo.png" width="200">
</div>

1 个答案:

答案 0 :(得分:0)

只需提供您的img r = Rake(ranking_metric= Metric.DEGREE_TO_FREQUENCY_RATIO, language= 'english', min_length=1, max_length=4) r.extract_keywords_from_text(test.document[177]) r.get_ranked_phrases() #prints a list of keywords test['keywords'] = test.applymap(lambda x: r.extract_keywords_from_text(x)) #trying to apply it to each row. ,因为如果没有position : relative相对或绝对z-index,则position不起作用