|
Ok!
|
|
|
Ok!
|
---|---|---|---|---|
9 | CModule::IncludeModule("iblock"); $res = CIBlockElement::GetByID(273); if($obRes = $res->GetNextElement()) { $ar_mir = $obRes->GetProperty("href_mir"); $ar_gil = $obRes->GetProperty('href_gil'); echo $ar_mir['VALUE']['TEXT']; echo $ar_gil['VALUE']['TEXT']; } | битрикс, свойство блока, свойство инфоблока, свойство, инфоблок | 29 | Получить свойство инфоблока по ID элемента |
20 | :root { font-size: calc(1vw + 1vh + .5vmin); } Now you can utilize the root em unit based on the value calculated by :root: body { font: 1rem/1.6 sans-serif; } | css, шрифт, адаптивно | 20 | Установка размера шрифта в CSS адаптивно изменяющегося к любой ширине экрана |
1 | function rus2translit($string) { $converter = array( 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', 'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sch', 'ь' => 'j', 'ы' => 'y', 'ъ' => 'j', 'э' => 'e', 'ю' => 'yu', 'я' => 'ya', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'E', 'Ж' => 'Zh', 'З' => 'Z', 'И' => 'I', 'Й' => 'Y', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sch', 'Ь' => 'j', 'Ы' => 'Y', 'Ъ' => 'j', 'Э' => 'E', 'Ю' => 'Yu', 'Я' => 'Ya', ' ' => '_', '№' => 'No' ); return strtr($string, $converter); } function str2url($str) { $str = rus2translit($str); $str = strtolower($str); $str = preg_replace('~[^-a-z0-9_]+~u', '-', $str); $str = trim($str, "-"); return $str; } | translit, транслит, php | 15 | Транслит |
4 | Character Meaning Example . Matches any single character – c.t will match cat, cot, cut, etc. + Repeats the previous match one or more times – a+ matches a, aa, aaa, etc * Repeats the previous match zero or more times. – a* matches all the same things a+ matches, but will also match an empty string. ? Makes the match optional. colou?r will match color and colour. ^ Called an anchor, matches the beginning of the string ^a matches a string that begins with a $ The other anchor, this matches the end of the string. a$ matches a string that ends with a. ( ) Groups several characters into a single unit, and captures a match for use in a backreference. (ab)+ matches ababab - that is, the + applies to the group. For more on backreferences see below. [ ] A character class - matches one of the characters c[uoa]t matches cut, cot or cat. [^ ] Negative character class - matches any character not specified c[^/]t matches cat or c=t but not c/t | регулярные выражения, regexp | 10 | Значения символов регулярного выражения |
264 | <script src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox/fancybox.umd.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox/fancybox.css" /> <script type="text/javascript"> Fancybox.bind("a.fancybox", { // Your custom options }); </script> | fancybox | 0 | New fancybox 5 |