Daily Archives: 01.10.2014

Кастомизация скролла в 21м веке

Стилизация нативного scrollbar в Chrome. Chrome custom scroll .wrapper { width: 300px; height: 200px; background-color: red; overflow-y: auto; } .element { width: 200px; height: 500px; background-color: green; } ::-webkit-scrollbar { height: 10px; width: 6px; background: #fff; } ::-webkit-scrollbar-thumb { background: #616161; -webkit-border-radius: 1ex; -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75); } ::-webkit-scrollbar-corner { background: …

Read more

Настройка nginx для кроссдоменных ajax-запросов

Как разрешить кроссдоменные ajax-запросы в nginx. location /geoip { add_header Access-Control-Allow-Origin «*»; add_header Access-Control-Allow-Methods «GET»; add_header Access-Control-Allow-Methods «OPTIONS»; } upstream GEOIP { server []; } server { listen *:80; server_name []; location /geoip { # CORS Headers if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Methods «GET»; add_header Access-Control-Allow-Origin «*»; return 204; } add_header Access-Control-Allow-Origin «*»; …

Read more