Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tasks/1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div,
aside
{
background: #6698ff;
}

.c1
{
background: #ff6698;
}

#id
{
background: #98ff66;
}
</style>

<section class="global-result">
Expand Down
10 changes: 9 additions & 1 deletion tasks/10.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
.title::first-letter
{
color: #ff6698;
}

.description::first-line
{
color: #6698ff;
}
</style>

<section class="global-result">
Expand Down
15 changes: 14 additions & 1 deletion tasks/11.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
input:invalid
{
border: 3px solid #ff6698;
}

input:valid
{
border: 3px solid #98ff66;
}

input:focus
{
border: 3px solid #6698ff;
}
</style>

<section class="global-result">
Expand Down
11 changes: 10 additions & 1 deletion tasks/12.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно решить без использования nth

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А как это делается без nth-child?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

попробуй с помощью :only-of-type

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Но там же они все divы -_-"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

обрати внимание на переносы строк

{
background: #ffb366;
}

div:nth-child(even),
div:nth-child(5n)
{
background: #ff6;
}
</style>

<section class="global-result">
Expand Down
5 changes: 4 additions & 1 deletion tasks/13.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div > div:only-of-type
{
background: #ff6698;
}
</style>

<section class="global-result">
Expand Down
6 changes: 5 additions & 1 deletion tasks/14.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
li::before
{
content: '+';
margin-right: 4px;
}
</style>

<section class="global-result">
Expand Down
6 changes: 5 additions & 1 deletion tasks/15.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
a[href$='.zip']::after
{
content: '↓';
margin-left: 4px;
}
</style>

<section class="global-result">
Expand Down
20 changes: 19 additions & 1 deletion tasks/16.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,25 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div
{
background: #ff6698 !important;
}

.c1
{
background: #6698ff !important;
}

#id1
{
background: #ffb366 !important;
}

.c7
{
background: #ff6 !important;
}
</style>

<section class="global-result">
Expand Down
5 changes: 4 additions & 1 deletion tasks/17.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
input[type='checkbox']:checked ~ input[type='checkbox']:not(:checked)
{
outline: 1px solid #ff6698;
}
</style>

<section class="global-result">
Expand Down
16 changes: 15 additions & 1 deletion tasks/18.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div
{
background: #ff6698;
opacity: .5;
}

article:hover div:not(:hover)
{
opacity: .3;
}

div:hover
{
opacity: 1;
}
</style>

<section class="global-result">
Expand Down
30 changes: 29 additions & 1 deletion tasks/19.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,35 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
article > div
{
background: #ffb366;
}

div
{
background: white;
}

div:first-child div:last-child
{
background: #98ff66;
}

div:last-child div:first-child
{
background: #ff6;
}

div:nth-of-type(4n-2) > :nth-child(even)
{
background: #ff6698;
}

div:nth-of-type(4n-1) > :nth-child(odd)
{
background: #6698ff;
}
</style>

<section class="global-result">
Expand Down
16 changes: 15 additions & 1 deletion tasks/2.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
.c1.c2
{
background: #6698ff;
}

.c2
{
background: #ffb366;
}

.c1
{
background: #ff6698;
border: 2px solid #000;
}
</style>

<section class="global-result">
Expand Down
11 changes: 10 additions & 1 deletion tasks/20.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div div:nth-child(1):nth-last-child(3),
div div:nth-child(2):nth-last-child(2),
div div:nth-child(3):nth-last-child(1),
div div:nth-child(1):nth-last-child(4),
div div:nth-child(2):nth-last-child(3),
div div:nth-child(3):nth-last-child(2),
div div:nth-child(4):nth-last-child(1)
{
background: #ff6698;
}
</style>

<section class="global-result">
Expand Down
10 changes: 9 additions & 1 deletion tasks/3.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div:not(:empty)
{
border: 2px solid #000;
}

div div
{
background: #6698ff;
}
</style>

<section class="global-result">
Expand Down
10 changes: 9 additions & 1 deletion tasks/4.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
article article:not(:first-of-type)
{
border-top: 1px solid #000;
}

article article:nth-child(even)
{
background: #ff6;
}
</style>

<section class="global-result">
Expand Down
6 changes: 5 additions & 1 deletion tasks/5.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
input[type='checkbox']:checked ~ .tab
{
background: black;
color: white;
}
</style>

<section class="global-result">
Expand Down
10 changes: 9 additions & 1 deletion tasks/6.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
[href]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно указать тэг ссылки, чтобы селектор искал только ссылки

{
color: #6698ff;
}

[href*='yandex.ru']
{
color: #ff6698;
}
</style>

<section class="global-result">
Expand Down
5 changes: 4 additions & 1 deletion tasks/7.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
div :not([alt])
{
opacity: .3;
}
</style>

<section class="global-result">
Expand Down
5 changes: 4 additions & 1 deletion tasks/8.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
a[target='_blank']
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно выделить внешние ссылки, а не те, которые открываются в новом окне

{
color: #ff6698;
}
</style>

<section class="global-result">
Expand Down
27 changes: 26 additions & 1 deletion tasks/9.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,32 @@ <h1 class="global-heading">&nbsp;</h1>

<main class="global-results">
<style>
/* your styles here */
.link[href]
{
color: #6698ff;
opacity: 1;
}

.link[href]:visited
{
color: #ffb366;
}

.link[href]:focus
{
color: #98ff66;
}

.link[href]:hover
{
color: #ff6698;
opacity: 1;
}

.link:hover
{
opacity: .5;
}
</style>

<section class="global-result">
Expand Down