/* ელემენტი */
p { color: red; }
/* კლასი */
.button { background: blue; }
/* აიდი */
#header { font-size: 20px; }
/* კომბინაცია */
div#main.content { padding:10px; }
/* შვილობილი */
ul li { margin:5px; }
/* ყველა ელემენტი */
* { box-sizing:border-box; }
div {
width: 200px;
padding: 10px;
border: 2px solid black;
margin: 5px;
box-sizing: border-box; /* padding და border არ აფუჭებს width */
}
color: #333; /* ტექსტის ფერი */
font-size: 16px; /* ზომა */
font-weight: bold; /* სისქე */
font-style: italic; /* სტილი */
line-height: 1.5; /* ხაზებს შორის */
letter-spacing: 1px; /* ასოების დაშორება */
text-align: center; /* განლაგება */
text-transform: uppercase; /* ასოების გარდაქმნა */
text-decoration: underline; /* ხაზის დამატება */
background-color: #f5f5f5;
background-image: url('image.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
opacity: 0.8; /* გამჭვირვალობა */
color: #2c3e50; /* ტექსტის ფერი */
border: 2px solid black;
border-top: 3px dashed red;
border-radius: 10px;
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
outline: 2px dotted blue; /* მხოლოდ ფოკუსისთვის */
.container {
display: flex;
justify-content: space-between; /* ჰორიზონტალური განლაგება */
align-items: center; /* ვერტიკალური განლაგება */
flex-wrap: wrap; /* გადატანა საჭიროების შემთხვევაში */
}
.item { flex: 1; } /* თითოეული ელემენტი თანაბარი ზომით */
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}
.grid-item {
background: #eee;
padding: 10px;
}
position: static | relative | absolute | fixed | sticky;
top: 10px; left: 20px;
z-index: 10; /* გვერდის ელემენტების stack წესი */
overflow: visible | hidden | scroll | auto;
visibility: visible | hidden;
transition: all 0.3s ease;
@keyframes fadeIn {
from {opacity: 0;}
to {opacity: 1;}
}
.element { animation: fadeIn 2s forwards; }
a:hover { color: red; }
input:focus { border-color: blue; }
p::first-letter { font-size: 2em; }
p::before { content: "► "; }
p::after { content: "✓"; }
li:nth-child(odd) { background: #eee; }
@media (max-width: 768px) {
.container { flex-direction: column; }
.grid { grid-template-columns: 1fr; }
}
document.querySelectorAll('.card h2').forEach(h => {
const def = h.nextElementSibling;
h.addEventListener('click', () => {
document.querySelectorAll('.definition').forEach(d => { if(d!==def) d.style.display='none'; });
def.style.display = def.style.display==='block'?'none':'block';
});
});