input:focus:-moz-placeholder {
color: transparent;
}
input:focus::-webkit-input-placeholder {
color: transparent;
}
input:-moz-placeholder {
color: #ccc;
}
input::-webkit-input-placeholder {
color: #ccc;
}
textarea:focus:-moz-placeholder {
color: transparent;
}
textarea:focus::-webkit-input-placeholder {
color: transparent;
}
textarea:-moz-placeholder {
color: #ccc;
}
textarea::-webkit-input-placeholder {
color: #ccc;
}
@font-face {
font-family: 'SegoeUI';
src: url('../fonts/SegoeUIItalic/SegoeUIItalic.eot');
src: url('../fonts/SegoeUIItalic/SegoeUIItalic.eot?iefix') format('eot'),
url('../fonts/SegoeUIItalic/SegoeUIItalic.woff') format('woff'),
url('../fonts/SegoeUIItalic/SegoeUIItalic.ttf') format('truetype'),
font-weight: normal;
font-style: italic;
}
<div class="wrap">
<img src="http://putevoditel-altai.ru/uploads/photos/previews/834_enshhs-bcb.jpg" alt="">
<div class="text">text</div>
</div>
.wrap {
position: relative;
}
img {
margin: 50px;
}
.text {
position: absolute;
top: 0;
left: 0;
font-size: 75px;
height: 75px;
background: #999 linear-gradient(to right, #999 0, #999 50px, #fff 51px, #fff 100%) no-repeat left bottom / 100% 25px;
-webkit-background-clip: text;
-moz-background-clip: text;
-o-background-clip: text;
background-clip: text;
color: transparent;
}
прописываю position: fixed то они начинают позиционироваться не относительно своего родителя, а относительно всего окна браузера, почему так?
position: fixed