CSS border-bottom-width ããããã£
Baseline
åºãå©ç¨å¯è½
ãã®æ©è½ã¯åºãå®è£ ããã¦ãããå¤ãã®ãã¼ã¸ã§ã³ã®ç«¯æ«ããã©ã¦ã¶ã¼ã§åä½ãã¾ãã2015å¹´7æä»¥éããã¹ã¦ã®ãã©ã¦ã¶ã¼ã§å©ç¨å¯è½ã§ãã
border-bottom-width 㯠CSS ã®ããããã£ã§ãããã¯ã¹ã®ä¸ã®å¢çã®å¹
ãè¨å®ãã¾ãã
試ãã¦ã¿ã¾ããã
border-bottom-width: thick;
border-bottom-width: 2em;
border-bottom-width: 4px;
border-bottom-width: 2ex;
border-bottom-width: 0;
<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
ããã¯ããã¯ã¹ã¨ããããå²ãå¢çç·ã§ãã
</div>
</section>
#example-element {
background-color: palegreen;
color: black;
border: 0 solid crimson;
padding: 0.75em;
width: 80%;
height: 100px;
}
æ§æ
css
/* ãã¼ã¯ã¼ãå¤ */
border-bottom-width: thin;
border-bottom-width: medium;
border-bottom-width: thick;
/* <length> å¤ */
border-bottom-width: 10em;
border-bottom-width: 3vmax;
border-bottom-width: 6px;
/* ã°ãã¼ãã«ãã¼ã¯ã¼ã */
border-bottom-width: inherit;
border-bottom-width: initial;
border-bottom-width: revert;
border-bottom-width: revert-layer;
border-bottom-width: unset;
å¤
<line-width>-
å¢çã®å¹ ããæç¤ºçãªéè² ã®
<length>ã¾ãã¯ãã¼ã¯ã¼ãã§å®ç¾©ãã¾ãããã¼ã¯ã¼ãã®å ´åã以ä¸ã®å¤ã®ããããã§ãªããã°ãªãã¾ãããthin1pxã¨åãã§ãã
medium3pxã¨åãã§ãã
thick5pxã¨åãã§ãã
å ¬å¼å®ç¾©
| åæå¤ | medium |
|---|---|
| é©ç¨å¯¾è±¡ | ãã¹ã¦ã®è¦ç´ ã ::first-letter ã«ãé©ç¨ããã¾ãã |
| ç¶æ¿ | ãªã |
| è¨ç®å¤ | the absolute <length>, snapped as a line width |
| ã¢ãã¡ã¼ã·ã§ã³ã®ç¨®é¡ | length |
形弿æ³
border-bottom-width =
<line-width>
<line-width> =
<length [0,â]> |
hairline |
thin |
medium |
thick
ä¾
>ä¸å¢çã®å¤ªãã®æ¯è¼
HTML
html
<div>è¦ç´ 1</div>
<div>è¦ç´ 2</div>
CSS
css
div {
border: 1px solid red;
margin: 1em 0;
}
div:nth-child(1) {
border-bottom-width: thick;
}
div:nth-child(2) {
border-bottom-width: 2em;
}
çµæ
仿§æ¸
| 仿§æ¸ |
|---|
| CSS Backgrounds and Borders Module Level 3 > # border-width > |
ãã©ã¦ã¶ã¼ã®äºææ§
é¢é£æ å ±
- å¢çã®å¤ªãã«é¢ããä»ã® CSS ããããã£:
border-left-width,border-right-width,border-top-width,border-width - ä¸ã®å¢çã«é¢ããä»ã® CSS ããããã£:
border,border-bottom,border-bottom-style,border-bottom-color