1.4 KiB
1.4 KiB
id, title, challengeType, videoUrl, forumTopicId, localeTitle
id | title | challengeType | videoUrl | forumTopicId | localeTitle |
---|---|---|---|---|---|
587d78a6367417b2b2512adb | Use the CSS Transform Property skewX to Skew an Element Along the X-Axis | 0 | https://scrimba.com/c/cyLP8Sr | 301074 | 使用 CSS Transform skex 属性沿X轴倾斜元素 |
Description
transform
属性是 skewX
,skewX
使选择的元素沿着 X 轴(横向)翻转指定的角度。
下面的代码沿着 X 轴翻转段落元素 -32 度。
p {
transform: skewX(-32deg);
}
Instructions
transform
属性沿 X 轴翻转 id 为 bottom
的元素 24 度。
Tests
tests:
- text: 'id 为 <code>bottom</code> 的元素应该沿着 X 轴翻转 24 度。'
testString: 'assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g), ''id 为 <code>bottom</code> 的元素应该沿着 X 轴翻转 24 度。'');'
Challenge Seed
<style>
div {
width: 70%;
height: 100px;
margin: 50px auto;
}
#top {
background-color: red;
}
#bottom {
background-color: blue;
}
</style>
<div id="top"></div>
<div id="bottom"></div>
Solution
// solution required