--- title: border-block-end slug: Web/CSS/border-block-end translation_of: Web/CSS/border-block-end --- <p>{{CSSRef}}{{SeeCompatTable}}</p> <p><strong><code>border-block-end</code></strong> <span class="outputBox-2liU7_0"> 属性是一个简写属性,用于在样式表中的单个位置设置各个逻辑块结尾边界属性值。</span></p> <div>{{EmbedInteractiveExample("pages/css/border-block-end.html")}}</div> <p class="hidden">该交互式示例的源码存储在GitHub存储库中。如果你想参与该项目的开发, 请克隆 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> 并向我们发送拉取代码请求</p> <h2 id="Syntax">Syntax</h2> <pre class="brush:css no-line-numbers">border-block-end: 1px; border-block-end: 2px dotted; border-block-end: medium dashed blue; </pre> <p><code>border-block-end</code> can be used to set the values for one or more of {{cssxref("border-block-end-width")}}, {{cssxref("border-block-end-style")}}, and {{cssxref("border-block-end-color")}}. The physical border to which it maps depends on the element's writing mode, directionality, and text orientation. It corresponds to the {{cssxref("border-top")}}, {{cssxref("border-right")}}, {{cssxref("border-bottom")}}, or {{cssxref("border-left")}} property depending on the values defined for {{cssxref("writing-mode")}}, {{cssxref("direction")}}, and {{cssxref("text-orientation")}}.</p> <p>Related properties are {{cssxref("border-block-start")}}, {{cssxref("border-inline-start")}}, and {{cssxref("border-inline-end")}}, which define the other borders of the element.</p> <p>{{cssinfo}}</p> <h3 id="Values">Values</h3> <p>The <code>border-block-end</code> is specified with one or more of the following, in any order:</p> <dl> <dt><code><'border-width'></code></dt> <dd>The width of the border. See {{cssxref("border-width")}}.</dd> <dt><code><'border-style'></code></dt> <dd>The line style of the border. See {{cssxref("border-style")}}.</dd> <dt><code><'color'></code></dt> <dd>The color of the border. See {{cssxref("color")}}.</dd> </dl> <h3 id="Formal_syntax">Formal syntax</h3> {{csssyntax}} <h2 id="Example">Example</h2> <h3 id="HTML_Content">HTML Content</h3> <pre class="brush: html"><div> <p class="exampleText">Example text</p> </div> </pre> <h3 id="CSS_Content">CSS Content</h3> <pre class="brush: css">div { background-color: yellow; width: 120px; height: 120px; } .exampleText { writing-mode: vertical-rl; border-block-end: 5px dashed blue; }</pre> <p>{{EmbedLiveSample("Example", 140, 140)}}</p> <h2 id="Specification">Specification</h2> <table class="standard-table"> <thead> <tr> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td>{{SpecName("CSS Logical Properties", "#propdef-border-block-end", "border-block-end")}}</td> <td>{{Spec2("CSS Logical Properties")}}</td> <td>Initial definition</td> </tr> </tbody> </table> <h2 id="Browser_compatibility">Browser compatibility</h2> <p>{{Compat("css.properties.border-block-end")}}</p> <h2 id="See_also">See also</h2> <ul> <li>This property maps to one of the physical border properties: {{cssxref("border-top")}}, {{cssxref("border-right")}}, {{cssxref("border-bottom")}}, or {{cssxref("border-left")}}.</li> <li>{{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}}</li> </ul> <div class="content-3WfBL_0" id="translate-man-app" style="background-color: rgb(255, 255, 255); left: 9px; top: 99px; display: none;"> <div class="outputBox-qe9A4_0"> <div class="outputBox-3oESn_0"> </div> <div class="outputBox-1GLb__0"> <div class="outputBox-onVZH_0"><img class="icon-tprjJ_0"></div> </div> <div class="outputBox-2sJgr_0"> </div> <div class="outputBox-17RAm_0" class="hidden"> <div> </div> </div> </div> </div>