This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//html | |
<div class="bx-content"> | |
<h1>Каким способом можно обрезать текст с троеточием в конце?</h1> | |
<div class="news-content">Добрый день! Интересует вопрос как можно обрезать текст, чтобы в конце всегда было троеточие. Вариант с подставлением туда рисунка с градиентным фоном не выход. CSS свойство {text-overflow: ellipsis} тоже не помогает, так как оно работает с одной строчкой, у меня же блок с текстом на 5-6 строк. Посоветуйте по возможности более-менее детальную инфу как это сделать. Спасибо за ответ.</div> | |
<a href="https://toster.ru/q/200977?e=1710511">https://toster.ru/q/200977?e=1710511</a> | |
</div> | |
//js | |
var size = 120, | |
newsContent= $('.news-content'), | |
newsText = newsContent.text(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html// | |
<circle data-toll="SVG/CSS Tip" class="tool "r="25" cx="50" cy="50" fill="red"/> | |
<g class="tooltip css" transform="translate(50,50)"> | |
<text text-anchor="middle" fill="red"> | |
</text> | |
</g> | |
</svg> | |
css// | |
.tooltip { | |
pointer-events:none; /*let mouse events pass through*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!html> | |
<div class="dropdown-wrapper"> | |
<div class="ae-dropdown dropdown"> | |
<div class="ae-select"> | |
<span class="ae-select-content"></span> | |
<i class="material-icons down-icon">keyboard_arrow_down</i> | |
</div> | |
<ul class="dropdown-menu ae-hide"> | |
<li class='selected'><a>Dr</a></li> | |
<li><a>Mr</a></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//product gallery html | |
<div class="product-picture"> | |
<div class="main-picture"> | |
<img src="img/product1.png" alt=""> | |
</div> | |
<div class="pictures-wrapper"> | |
<div class="gallery-item active"> | |
<img src="img/product1.png" alt="#"> | |
</div> | |
<div class="gallery-item"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $btnTop = $("my-btn"); | |
$(window).on("scroll",function(){ | |
if ($(window).scrollTop() >=20){ | |
$btnTop.fade(); | |
}else{ | |
$btnTop.fadeOut(); | |
} | |
}); | |
$btnTop.on('click',function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
-webkit-overflow-scrolling: touch; | |
} | |
body.mfp-zoom-out-cur { | |
overflow: hidden; | |
-webkit-overflow-scrolling: auto; | |
} | |
.mfp-wrap { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HTML | |
<script src="https://maps.googleapis.com/maps/api/js?v=3&key="></script> | |
//JS | |
function initMap() { | |
var coordinates = {lat: -37.806006, lng: 144.961291}, // Координаты центра карты | |
markerImg = 'img/marker.png', // Иконка для маркера | |
// создаем карту и настраеваем | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: coordinates, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////Html | |
<div class="wr"> | |
<a href="#" class="item"> | |
<div class="item__content"> | |
<div class="elem1"> | |
</div> | |
<div class="elem2"> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var body = $("body"); | |
body.fadeIn(400); | |
$(document).on("click", "a:not([href^='#']):not([href^='tel']):not([href^='mailto'])", function(e) { | |
e.preventDefault(); | |
$("body").fadeOut(400); | |
var self = this; | |
setTimeout(function () { | |
window.location.href = $(self).attr("href"); |