Skip to content

Instantly share code, notes, and snippets.

@aligator28
aligator28 / Tooltip triangle (подсказка с треугольничком внизу на CSS)
Last active February 28, 2023 17:40
CSS Tooltip triangle (подсказка с треугольничком внизу на CSS)
Sure, here's an example of CSS code that can display a tooltip block without using any images:
.tooltip {
position: relative;
display: inline-block;
cursor: pointer;
}
.tooltip::before {
content: "";
@aligator28
aligator28 / Image instead of Video (ease page load)
Last active March 1, 2023 10:33
Image instead of Video (ease page load)
index.html
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title></title>
<style>
.page {
контейнер для непропорционального контента
.main-block__video {
position: relative;
width: 100%;
height: 0;
padding-bottom: calc(100% / 1.78); // Just proportions of video 16:9 (You can use 100% and You shoud divide width on 1.78 (40% / 1.78 = 22.47%)
}
}