a{ background-position:center center; background-repeat:no-repeat; filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); -webkit-filter:grayscale(100%); } a:hover{ filter:none; -webkit-filter:none; }
Рубрика
CSS
Всего: 63 записи
less css3 calc()
.text{ width:~"calc(100% - 100px)"; }
вместо
.text{ width:calc(100% - 100px); }
css — linear-gradient android
Универсально:
background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0%,#0070bf),color-stop(100%,#005c9d)); background:-moz-linear-gradient(to bottom,#0070bf,#005c9d); background:-webkit-linear-gradient(to bottom,#0070bf,#005c9d); background:linear-gradient(to bottom,#0070bf,#005c9d);
Текст в 2 колонки
.block{ column-count:2; column-gap:30px; }
column-gap — межколоночный интервал
CSS тряска
@keyframes trambling-animation{ 0%,50%,100%{ transform:rotate(0deg); } 10%,30%{ transform:rotate(-10deg); } 20%,40%{ transform:rotate(10deg); } } .trambling{ animation:1.2s ease-in-out 0s normal none infinite running trambling-animation; }
LESS с поддержкой старых браузеров
.transform(@transform){ -moz-transform:@transform; -ms-transform:@transform; -webkit-transform:@transform; -o-transform:@transform; transform:@transform; } .animation(@animation){ -webkit-animation:@animation; -moz-animation:@animation; -o-animation:@animation; animation:@animation; } @keyframes trambling-animation{ 0%,50%,100%{ .transform(rotate(0deg)); } 10%,30%{ .transform(rotate(-10deg)); } 20%,40%{ .transform(rotate(10deg)); } } .trambling{ .animation(1.2s ease-in-out 0s normal none infinite running trambling-animation); }
Или используйте jquery плагин jRumble:
https://jackrugile.com/jrumble/
display inline-block ie
display:-moz-inline-stack; display:inline-block; vertical-align:top; zoom:1; *display:inline;
display table-cell ie
Решается метатегом
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>