1.8 KiB
1.8 KiB
id, title, challengeType, videoUrl, forumTopicId, localeTitle
id | title | challengeType | videoUrl | forumTopicId | localeTitle |
---|---|---|---|---|---|
587d78a6367417b2b2512adc | Use the CSS Transform Property skewY to Skew an Element Along the Y-Axis | 0 | https://scrimba.com/c/c2MZ2uB | 301075 | Используйте свойство CSS Transform Property skewY для искажения элемента по оси Y |
Description
skewX()
выделенный элемент вдоль оси X на заданную степень, неудивительно, что skewY()
элемент вдоль оси Y (по вертикали).
Instructions
top
-10 градусов по оси Y, используя свойство transform
.
Tests
tests:
- text: The element with id <code>top</code> should be skewed by -10 degrees along its Y-axis.
testString: assert(code.match(/#top\s*?{\s*?.*?\s*?transform:\s*?skewY\(-10deg\);/g));
Challenge Seed
<style>
div {
width: 70%;
height: 100px;
margin: 50px auto;
}
#top {
background-color: red;
}
#bottom {
background-color: blue;
transform: skewX(24deg);
}
</style>
<div id="top"></div>
<div id="bottom"></div>
Solution
<style>
div {
width: 70%;
height: 100px;
margin: 50px auto;
}
#top {
background-color: red;
transform: skewY(-10deg);
}
#bottom {
background-color: blue;
transform: skewX(24deg);
}
</style>
<div id="top"></div>
<div id="bottom"></div>