Показать сообщение отдельно
  #8 (permalink)  
Старый 12.12.2016, 18:38
Аватар для Malleys
Профессор
Отправить личное сообщение для Malleys Посмотреть профиль Найти все сообщения от Malleys
 
Регистрация: 20.12.2009
Сообщений: 1,714

Для достижения того же самого эффекта можно использовать background-blend-mode

Чёрный фон + цветная фоновая картинка и режим наложения luminosity...

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style type="text/css">
    
.blockPhotos{
    margin: 1%;
    border: 1px solid;
    width: 650px;
    height: 900px;
}


.boxPhoto{
    margin: 1% 2%;
    width: 600px;
    height: 859px;
    border: 1px solid;
    cursor: pointer;
}

.fullGate{
    position: relative;
    width: 100%;
    height: 100%;
    outline: 1px solid;
}

.ph_1{
    background: url('https://github.com/BlackStar1991/Pictures-for-sharing-/blob/master/Scarlett_Johansson.jpg?raw=true') no-repeat 50% 50%, black;
    background-blend-mode: luminosity;
}

.icon{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 256px;
    height: 256px;
    background: url('https://raw.githubusercontent.com/BlackStar1991/Pictures-for-sharing-/master/ScarlettJohansson.png') no-repeat 50% 50%;
}
    </style>
</head>
<body>

<div class="blockPhotos">
    <div class="boxPhoto ph_1">
        <div class="fullGate">
            <div class="icon"></div>
        </div>
    </div>
</div>
</body>
</html>


Поддержка браузерами http://caniuse.com/#search=background-blend-mode
Ответить с цитированием