缩放背景但不缩放子级

时间:2018-11-09 15:01:06

标签: html css

我有一个带有背景图像的div,我想在悬停时缩放它,但是我不想缩放div的子级。我已经尝试了很多事情,但是还没有找到解决方案。有人知道怎么做吗?

我想在悬停时缩放.bgi

div.header
{
    grid-area: header;
    overflow: hidden;
    display: flex;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: space-between;    
}
div.bgi
{  
    background-image: url(images/office.jpg);    
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}
        <div class="header bgi tint">
            <div class="logo">
                <img src="assets/images/logo.png" />
            </div>
            <a class="Links" id="link" href="/someurl.html"
                name
            </a>

        </div>

0 个答案:

没有答案