-1
A
答えて
0
にあなたが値skew()
とCSS transform:
を使用していることを達成することができます背景のような唯一の「背景色」としたいです。
* {
margin: 0 auto;
padding: 0;
}
ul {
display: block;
width: auto;
margin-top: 60px;
background-color: blue;
height: 45px;
font-family: calibri;
font-weight: bold;
text-align: center;
}
li {
display: inline-block;
line-height: 45px;
padding: 0 25px 0 25px;
background-color: orange;
font-size: 24px;
transform: skew(20deg); /* To Achieve the Slanted border */
margin-right: -3px;
}
li a {
color: white;
display: block;
transform: skew(-20deg); /* To straighten up the text */
}
<ul>
<li><a href"#">About</a></li>
</ul>
0
あなたは平行四辺形やひし形を探しているように見えます。これを行うには、transform: skew
#about {
\t width: 120px;
\t height: 20px;
\t -webkit-transform: skew(20deg);
\t -moz-transform: skew(20deg);
\t -o-transform: skew(20deg);
\t background: blue;
color: white;
font-size: 20px;
padding-bottom: 5px;
text-align: center;
margin-left: 20px;
}
<div id="about">About us</div>
関連する問題
- 1. .BackgroundColorは、背景色
- 2. 背景グラデーションの色と背景イメージDRYly
- 3. CSS:背景色の背景画像
- 4. JavaScriptで「背景色:背景」 - 色を取得するには?
- 5. 背景色:Android
- 6. AlertDialog背景色
- 7. NSImageView +背景色
- 8. TodayExtension背景色
- 9. CodenameOne背景色
- 10. UITableViewCell背景色?
- 11. ItemControl背景色
- 12. 背景色が
- 13. NILauncherView背景色
- 14. 背景色
- 15. JList背景色
- 16. PreferenceFragment背景色
- 17. 背景色が
- 18. 背景色行
- 19. アンドロイドプリファレンスカテゴリの背景色
- 20. イオンタブの背景色
- 21. gnuplotの背景色
- 22. ウォリアリセットキャンセルボタンの背景色
- 23. アニメーショングリッドの背景色
- 24. UIWebViewの背景色
- 25. ドロップダウンメニューの背景色
- 26. タブウィジェットの背景色
- 27. トランジションアニメーションの背景色
- 28. ビューグラデーションの背景色
- 29. セグメントコントロールの背景色
- 30. JTabの背景色
は素晴らしいサウンドを使用することができます。何を試しましたか? – j08691
http://codepen.io/gc-nomade/pen/pyOxyV/?はい、これは実際には多くの重複の中でここに質問への答えだったので、SOの少しの検索はそれを行う必要があります:) –
何人かがダウン投票をした理由は? – mustint