1.5 KiB
1.5 KiB
id, title, challengeType, videoUrl, forumTopicId, dashedName
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
587d78a6367417b2b2512adb | CSS の Transform プロパティ skewX を使用して要素を X 軸に沿ってゆがめる | 0 | https://scrimba.com/c/cyLP8Sr | 301074 | use-the-css-transform-property-skewx-to-skew-an-element-along-the-x-axis |
--description--
transform
プロパティの次の関数は skewX()
です。これは選択された要素を X 軸 (水平方向) に沿って指定された角度だけゆがめます。
次のコードは、段落要素を X 軸に沿って -32 度傾けます。
p {
transform: skewX(-32deg);
}
--instructions--
transform
プロパティを使って、id bottom
を持つ要素を X 軸に沿って 24 度傾けてください。
--hints--
id が bottom
の要素は X 軸に沿って 24 度傾けられている必要があります。
assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g));
--seed--
--seed-contents--
<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>
--solutions--
<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>