Содержание

Слайд 2

Selektorlarni birgalikda ishlatish

a {
font-size:16px;
text-decoration: dashed;
}
.qizil-fon {
background-color: tomato;
}
.yashil-fon {
background-color:

Selektorlarni birgalikda ishlatish a { font-size:16px; text-decoration: dashed; } .qizil-fon { background-color:
turquoise;
}
.sariq-matn {
color: yellow;
}
.oq-matn {
color: white;
}
...
This is div block.

This is link

QODIRBEK MAXAROV

Слайд 3

Selektorlar

Ishlatilishi bo'yicha selektorlarning quyidagi ko'rinishlari mavjud:
Kombinatorlar
Atribut selektorlari
Psevdosinflar
Psevdoelementlar

QODIRBEK MAXAROV

Selektorlar Ishlatilishi bo'yicha selektorlarning quyidagi ko'rinishlari mavjud: Kombinatorlar Atribut selektorlari Psevdosinflar Psevdoelementlar QODIRBEK MAXAROV

Слайд 4

Kombinatorlar

Guruhlash (grouping selector (,))
Avlod selektorlar (descendant selector (space))
Farzand selektorlar (child selector (>))
Qo'shni

Kombinatorlar Guruhlash (grouping selector (,)) Avlod selektorlar (descendant selector (space)) Farzand selektorlar
selektorlar (adjacent sibling selector (+))
Keyingi selektorlar (general sibling selector (~))

QODIRBEK MAXAROV

Слайд 5

Selektorlarni guruhlash
div {
color: tomato;
}
p {
color: tomato;
}
h2 {
color: tomato;
}
h3 {

Selektorlarni guruhlash div { color: tomato; } p { color: tomato; }
color: tomato;
}

QODIRBEK MAXAROV

div, p, h1, h2 {
color: tomato;
}

Слайд 6

Avlod selektorlar

QODIRBEK MAXAROV

element element {
/* stil xossalari */
}

Avlod selektorlar QODIRBEK MAXAROV element element { /* stil xossalari */ }

Слайд 7

Avlod selektorlar

body{
text-align: center;
}
div p{
color: blue;
font-size:18px;
font-weight: bold;
text-align:

Avlod selektorlar body{ text-align: center; } div p{ color: blue; font-size:18px; font-weight:
center;
}
...

This is 1st paragraph in the div.


This is 2nd paragraph in the div.



This is the span element in the div

This is the paragraph in the span. It will also be affected.



Paragraph 4. It will not be affected because it is not in the div.


QODIRBEK MAXAROV

Слайд 8

Farzand selektorlar

QODIRBEK MAXAROV

element > element {
/* stil xossalari */
}

Farzand selektorlar QODIRBEK MAXAROV element > element { /* stil xossalari */ }

Слайд 9

Farzand selektorlar

body {
font-size: 14px;
text-align: center;
}
div > p {
color:

Farzand selektorlar body { font-size: 14px; text-align: center; } div > p
blue;
font-size:18px;
font-weight: bold;
text-align: center;
}
...

Child selector (>) property


It is the first paragraph


It is the second paragraph



This is third paragraph in h3 element


This is the fourth paragraph which is the child of div element


This is the fifth paragraph and also get selected because it is also the child of div element



QODIRBEK MAXAROV

Слайд 10

Qo'shni selektorlar

QODIRBEK MAXAROV

element + element {
/* stil xossalari */
}

Qo'shni selektorlar QODIRBEK MAXAROV element + element { /* stil xossalari */ }

Слайд 11

Qo'shni selektorlar

body {
font-size: 14px;
text-align: center;
}
p + p {
color:

Qo'shni selektorlar body { font-size: 14px; text-align: center; } p + p
blue;
font-size:18px;
font-weight: bold;
text-align: center;
}
...

Adjacent sibling selector (+) property


It is the first paragraph


It is the second paragraph which is immediately next to the first paragraph, and it get selected.


This is the div element

This is the third paragraph which does not get affected


This paragraph is also selected because it immediately next to third paragraph


QODIRBEK MAXAROV

Слайд 12

Keyingi selektorlar

QODIRBEK MAXAROV

element ~ element {
/* stil xossalari */
}

Keyingi selektorlar QODIRBEK MAXAROV element ~ element { /* stil xossalari */ }

Слайд 13

Keyingi selektorlar

body {
font-size: 14px;
text-align: center;
}
h1 ~ p {
color:

Keyingi selektorlar body { font-size: 14px; text-align: center; } h1 ~ p
blue;
font-size:18px;
font-weight: bold;
text-align: center;
}
...

General sibling selector (~) property


It is the first paragraph element which will get effected.


It is the div element

It is the paragraph under the div element



It is the paragraph element after the div


It is the paragraph element which will also get affected


QODIRBEK MAXAROV

Слайд 14

Atribut selektorlari

QODIRBEK MAXAROV

Atribut selektorlari QODIRBEK MAXAROV

Слайд 15

Atribut selektorlar

[title] {
border: 5px solid red;
}
[title=image] {
border: 5px solid green;
}
img[title~=flower]

Atribut selektorlar [title] { border: 5px solid red; } [title=image] { border:
{
border: 5px solid blue;
}
img[title|=flo] {
border: 5px solid orange;
}
...



This is div block (flo-is-red).

This is div block (image).

QODIRBEK MAXAROV

Слайд 16

Atribut selektorlar

a[href^="http://"] {
font-weight: bold;
text-decoration: none;
}
a[href$=".ru"] {
background: url(images/ru.png) no-repeat 0

Atribut selektorlar a[href^="http://"] { font-weight: bold; text-decoration: none; } a[href$=".ru"] { background:
4px;
padding-left: 20px;
}
a[href$=".uz"] {
background: url(images/uz.png) no-repeat 0 4px;
padding-left: 20px;
}
a[href*="ytit"] {
background-color: yellow;
}
...
YTIT web sayti
Hukuman portali
Biz haqimizda
mail.ru
yandex.ru

QODIRBEK MAXAROV

Слайд 17

Psevdosinflar

Psevdosinflar elementlarning dinamik holatini belgilaydi, ular foydalanuvchi harakati bilan o'zgaradi. Masalan, havola

Psevdosinflar Psevdosinflar elementlarning dinamik holatini belgilaydi, ular foydalanuvchi harakati bilan o'zgaradi. Masalan,
ustiga sichqoncha kursori kelganda rangini o'zgartirishi.
Selektor:Psevdosinf { stillar }
Turlari:
element holatini aniqlovchi (dinamik)
elementlar ierarxiyasiga (strukturasiga) bog'liq
Psevdosinflarni kombinatsiya ko'rinishida ishlatish mumkin:
Selektor:Psevdosinf1:Psevdosinf2 { stillar }

QODIRBEK MAXAROV

Слайд 18

Element holatini aniqlovchi psevdosinflar

:active – element foydalanuvchi tomonidan aktivlashtirilganda
:link – o'tilmagan havolalar

Element holatini aniqlovchi psevdosinflar :active – element foydalanuvchi tomonidan aktivlashtirilganda :link –
uchun stil
:hover – sichqoncha kursori element ustida bo'lganda
:visited – o'tilgan havolalar uchun stil
:lang() – lang atributi qiymati ga teng elementlar uchun
Namuna: a:hover { stillar }
Ushbu psevdosinflarni kombinatsiya ko'rinishida ishlatish mumkin:
a:visited:hover { stillar } a:link:visited { stillar }

QODIRBEK MAXAROV

Слайд 19

Element holatini aniqlovchi psevdosinflar

:checked – tanlangan element uchun
:disabled – o'chirilgan

Element holatini aniqlovchi psevdosinflar :checked – tanlangan element uchun :disabled – o'chirilgan
element uchun
:enabled – o'chirilmagan element uchun
:focus – element focus olganda
:in-range – aniqlangan qiymatlar chegarasida qiymat olgan element uchun
:invalid – noto'g'ri qiymatli elementi uchun
:optional – "required" atributi bo'lmagan elementi uchun
:out-of-range – aniqlangan qiymatlar chegarasida qiymat olmagan element uchun
:read-only – "readonly" atributi bo'lgan elementi uchun
:read-write – "readonly" atributi bo'lmagan elementi uchun
:required – "required" atributi bo'lmagan elementi uchun
:valid – to'g'ri qiymatli elementi uchun

QODIRBEK MAXAROV

Слайд 20

QODIRBEK MAXAROV

Element holatini aniqlovchi psevdosinflar

A:link {
color: #036; /* O'tilmagan havola */
}
A:visited

QODIRBEK MAXAROV Element holatini aniqlovchi psevdosinflar A:link { color: #036; /* O'tilmagan
{
color: #0f0; /* O'tilgan havola */
}
A:hover {
color: #f00; /* Sichqoncha kursori kelganda */
}
A:active {
color: #ff0; /* Aktiv havola */
}
...
Havola 1 |
Havola 2 |
Havola 3

Слайд 21

QODIRBEK MAXAROV

Element holatini aniqlovchi psevdosinflar

table { border-spacing: 0; }
td { padding: 4px;

QODIRBEK MAXAROV Element holatini aniqlovchi psevdosinflar table { border-spacing: 0; } td
}
tr:hover { background: #fc0; }
...













...

Слайд 22

QODIRBEK MAXAROV

Element holatini aniqlovchi psevdosinflar

input:focus {
color: red;
}
...


QODIRBEK MAXAROV Element holatini aniqlovchi psevdosinflar input:focus { color: red; } ...



Слайд 23

QODIRBEK MAXAROV

Element holatini aniqlovchi psevdosinflar

input:disabled {
border: 2px dashed grey;
}
input:invalid {
color:

QODIRBEK MAXAROV Element holatini aniqlovchi psevdosinflar input:disabled { border: 2px dashed grey;
red;
border: 2px solid red;
}
input:valid {
color: green;
border: 2px solid green;
}
:focus:required {
background-color: coral;
color: cornsilk;
}
...






Слайд 24

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar

:empty – vorisi bo'lmagan element uchun
:first-child – o'zining

QODIRBEK MAXAROV Elementlar ierarxiyasiga bog'liq psevdosinflar :empty – vorisi bo'lmagan element uchun
ajdodiga birinchi voris bo'lgan element uchun (barcha elementlar ichidan)
:first-of-type – o'zining ajdodiga birinchi voris bo'lgan element uchun (faqat joriy selektorlar ichidan)
:last-child – o'zining ajdodiga oxirgi voris bo'lgan element uchun
:last-of-type – o'zining ajdodiga oxirgi voris bo'lgan element uchun
:not() - bo'lmagan barcha elementlar uchun
:nth-child(n) – o'zining ajdodiga voris elementlar birinchisidan hisoblaganda n-bo'lgan element uchun
:nth-last-child(n) – o'zining ajdodiga voris elementlar oxirgisidan hisoblaganda n-bo'lgan element uchun
:nth-last-of-type(n) – o'zining ajdodiga voris elementlar oxirgisidan hisoblaganda n-bo'lgan element uchun
:nth-of-type(n) – o'zining ajdodiga voris elementlar birinchisidan hisoblaganda n-bo'lgan element uchun
:only-of-type – o'zining ajdodiga yagona voris element uchun
:only-child – o'zining ajdodiga yagona voris element uchun
:target – aktiv #id element uchun

Слайд 25

QODIRBEK MAXAROV

p:empty {
width: 100px;
height: 20px;
background: #ff0000;
}
...


A paragraph.


Another paragraph.


Elementlar ierarxiyasiga

QODIRBEK MAXAROV p:empty { width: 100px; height: 20px; background: #ff0000; } ...
bog'liq psevdosinflar

Слайд 26

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar

p {
color: blue;
}
:not(p) {
color: red;
}
...

This is

QODIRBEK MAXAROV Elementlar ierarxiyasiga bog'liq psevdosinflar p { color: blue; } :not(p)
a heading

This is a paragraph.


This is another paragraph.


This is some text in a div element.

Link to YTIT!

Слайд 27

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar


...


First Child


First of type Child


Third Child


Fourth Child



Слайд 28

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar


...


This is a paragraph.




This is a span.

This is a paragraph.



Слайд 29

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar

nth-qoidalar quyidagi qiymat qabul qilishi mumkin:
son
kalit so'z (odd,

QODIRBEK MAXAROV Elementlar ierarxiyasiga bog'liq psevdosinflar nth-qoidalar quyidagi qiymat qabul qilishi mumkin:
even)
an+b ko'rinishidagi ifoda

Слайд 30

QODIRBEK MAXAROV

Elementlar ierarxiyasiga bog'liq psevdosinflar

tr:nth-child(odd) {
background: #FFBFBF; }

tr:nth-child(n+4):nth-child(odd) {
background: #FFBFBF; }

QODIRBEK MAXAROV Elementlar ierarxiyasiga bog'liq psevdosinflar tr:nth-child(odd) { background: #FFBFBF; } tr:nth-child(n+4):nth-child(odd) { background: #FFBFBF; }

Слайд 31

QODIRBEK MAXAROV

Psevdoelementlar

Psevdoelementlar – "virtual" element yaratish uchun ishlatiladi.
::before
::after
::first-letter
::first-line
::selection

QODIRBEK MAXAROV Psevdoelementlar Psevdoelementlar – "virtual" element yaratish uchun ishlatiladi. ::before ::after ::first-letter ::first-line ::selection

Слайд 32

QODIRBEK MAXAROV

Psevdoelementlar

p.new::before {
content: "!!!";
color: blue;
font: 40px Georgia;
} p.new::after {
content:

QODIRBEK MAXAROV Psevdoelementlar p.new::before { content: "!!!"; color: blue; font: 40px Georgia;
"";
width: 40px;
height: 20px;
background-image: url(images/flag-gb.svg);
background-size: 40px 20px;
background-repeat: no-repeat;
display: inline-block;
}
...

The Rector of YTIT Professor J.Kudaybergenov met with the Director for state and public cooperation of "Huawei Tech Investment Tashkent" company D. Azizov.


The Rector of YTIT Professor J.Kudaybergenov met with the Director for state and public cooperation of "Huawei Tech Investment Tashkent" company D. Azizov.


Слайд 33

QODIRBEK MAXAROV

Psevdoelementlar

p::first-letter {
color: #ff0000;
font-size: xx-large;
} p::first-line {
color: #0000ff;
font-variant: small-caps;
} div

QODIRBEK MAXAROV Psevdoelementlar p::first-letter { color: #ff0000; font-size: xx-large; } p::first-line {
{
width: 75%;
}
...

The Rector of YTIT Professor J.Kudaybergenov met with the Director for state and public cooperation of "Huawei Tech Investment Tashkent" company D. Azizov.



The Rector of YTIT Professor J.Kudaybergenov met with the Director for state and public cooperation of "Huawei Tech Investment Tashkent" company D. Azizov.



Слайд 34

QODIRBEK MAXAROV

Psevdoelementlar
/*::-moz-selection Firefox 62.0 gacha */
::selection {
color: red;
background: yellow;
}

The Rector

QODIRBEK MAXAROV Psevdoelementlar /*::-moz-selection Firefox 62.0 gacha */ ::selection { color: red;
of YTIT Professor J.Kudaybergenov met with the Director for state and public cooperation of "Huawei Tech Investment Tashkent" company D. Azizov.


Имя файла: 4.-CSS-2.pptx
Количество просмотров: 46
Количество скачиваний: 0
# Familiya Ism Otasining ismi
1 Alimov Karim Qosimovich