Skip to content

Instantly share code, notes, and snippets.

View xto3na's full-sized avatar

Sergey Ponomarenko xto3na

  • Dnepropetrovsk, Ukraine
View GitHub Profile
@xto3na
xto3na / Уголок на CSS
Created May 18, 2016 20:41
Уголок на CSS
.side-menu_ttl-txt:after {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
content: '';
width: 7px;
display: inline-block;
margin: auto 0;
border-top: 5px solid #000;
margin-left: 5px;
margin-bottom: 2px;
@xto3na
xto3na / Safary Parallax
Created May 17, 2016 11:33
Safary Parallax
#background-image {
z-index: -1;
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-size: 100%;
background-image: url("../../images/background_320.jpg");
background-attachment: fixed;
@xto3na
xto3na / Star Rating on CSS
Last active May 7, 2016 16:01
Star Rating on CSS
<!-- HTML -->
<div class="star-box">
<input id="rating-5" type="radio" name="rating" value="5" />
<label class="star-lbl" for="rating-5"></label>
<input id="rating-4" type="radio" name="rating" value="4" />
<label class="star-lbl" for="rating-4"></label>
<input id="rating-3" type="radio" name="rating" value="3" />
<label class="star-lbl" for="rating-3"></label>
<input id="rating-2" type="radio" name="rating" value="2" />
<label class="star-lbl" for="rating-2"></label>
@xto3na
xto3na / Safe Target Blank
Created May 3, 2016 15:26
Safe Target Blank
rel="nofollow noopener"
@xto3na
xto3na / Открытые только для админов элементы в Битрикс
Created April 26, 2016 11:16
Открытые только для админов элементы в Битрикс
<?
global $USER;
if ($USER->IsAdmin()){ ?><div class="double-video-block-ps"></div><? } ?>
@xto3na
xto3na / Phone Input validate
Created March 31, 2016 15:00
Phone Input validate
Допустимые значения: цифры, пробелы, скобки, тире, количество допустимых символов: 1 - 20 символов.
Остальные символы не вводятся.
<input type="text" id="phone" placeholder="+38 (099) ___-__-__">
<script>
document.addEventListener("DOMContentLoaded", function() {
$("#phone").keypress(function(eventObject) {
if (!(((eventObject.which >= 48) &&
(eventObject.which <= 57))
|| (eventObject.which == 32)
@xto3na
xto3na / matches
Created March 27, 2016 00:07
:matches CSS Selector
:matches(h1, h2, h3, h4, h5) > a {
color: rgb(91, 164, 229);
}
@xto3na
xto3na / Вложенные ссылки
Created March 25, 2016 20:13
Вложенные ссылки
HTML:
<a href="#url-1">TEXT-1
<object><a href="#url-2">TEXT-2</a></object>
TEXT-3</a>
BROWSER PARSER READS IT AS:
<a href="#url-1">TEXT-1</a>
<a href="#url-2">TEXT-2</a>
<a href="#url-1">TEXT-3</a>
@xto3na
xto3na / Регистрация события в Angular
Last active March 20, 2016 15:00
Регистрация события в Angular(при динамическом добавлении элемента)
var button = '<button class="delete-row" ng-click="deleteRow($element)"></button>';
button.on('click', $scope.deleteRow);
@xto3na
xto3na / ZOOM Photo in CSS
Created March 16, 2016 12:53
ZOOM Photo in CSS
<style type="text/css">
.zoom-images {
z-index: 999;
cursor: zoom-in;
}
.zoom-images:focus {
position: fixed;
z-index: 10;
top: 50%;
left: 50%;