<hr>
実際の適用例 ブラウザで提供されるデフォルトスタイル
<hr class="solid-hr">
hr.solid-hr {
    border: none; /* デフォルトの3D立体ボーダーを削除 */
    height: 2px; /* 線の太さ */
    background: gray; /* 線の色 */
    width: 50%; /* 線の幅(省略時は100%):自動で中央揃えになります */
}
実際の適用例
<hr class="solid-hr">
hr.solid-hr {
    border: none; 
    height: 5px;
    background: orangered;
    width: 50%;
}
実際の適用例
<hr class="solid-hr">
hr.solid-hr {
    border: none; 
    height: 5px;
    background: linear-gradient(to right, orange, red);
}
実際の適用例
<hr class="dotted-hr">
hr.dotted-hr {
    border: none; /* デフォルトの3D立体ボーダーを削除 */
    border-top-style: dotted;
    border-top-width: 2px; /* 線の太さ */
    border-top-color: gray; /* 線の色 */
    width: 50%; /* 線の幅(省略時は100%):自動で中央揃えになります */
}
実際の適用例
<hr class="dotted-hr">
hr.dotted-hr {
    border: none; 
    border-top-style: dotted;
    border-top-width: 5px;
    border-top-color: orangered; 
    width: 50%;
}
実際の適用例
<hr class="dotted-hr">
hr.dotted-hr {
    border: none; 
    border-top-style: dotted;
    border-top-width: 5px;
    border-top-color: orangered; 
}
実際の適用例
<hr class="dashed-hr">
hr.dashed-hr {
    border: none; /* デフォルトの3D立体ボーダーを削除 */
    border-top-style: dashed;
    border-top-width: 2px; /* 線の太さ */
    border-top-color: gray; /* 線の色 */
    width: 50%; /* 線の幅(省略時は100%):自動で中央揃えになります */
}
実際の適用例
<hr class="dashed-hr">
hr.dashed-hr {
    border: none; 
    border-top-style: dashed;
    border-top-width: 5px;
    border-top-color: orangered; 
    width: 50%;
}
実際の適用例
<hr class="dashed-hr">
hr.dashed-hr {
    border: none; 
    border-top-style: dashed;
    border-top-width: 5px;
    border-top-color: orangered; 
}
実際の適用例
<hr class="symmetrical-hr">
hr.symmetrical-hr {
    position: relative;
    overflow: visible;
    border: none;
    width: 300px; /* 中央の太い線の幅 */
    max-width: calc(33.333% - 10px); /* 中央の太い線の幅に関係なく、レスポンシブWebデザインに対応 */
    height: 10px; /* 中央の太い線の太さ */
    background: gray; /* 中央の太い線の色 */
}
hr.symmetrical-hr:before,
hr.symmetrical-hr:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 1px; /* 両側の細い線の太さ */
    background: gray; /* 両側の細い線の色 */
}
hr.symmetrical-hr:before {
    transform: translateX(calc(-100% - 5px)) translateY(-50%);
}
hr.symmetrical-hr:after {
    transform: translateX(calc(100% + 5px)) translateY(-50%);
}
実際の適用例
<hr class="symmetrical-hr">
hr.symmetrical-hr {
    position: relative;
    overflow: visible;
    border: none;
    width: 300px; 
    max-width: calc(33.333% - 10px);
    height: 8px;
    background: orangered; 
}
hr.symmetrical-hr:before,
hr.symmetrical-hr:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 1px;
    background: orangered; 
}
hr.symmetrical-hr:before {
    transform: translateX(calc(-100% - 5px)) translateY(-50%);
}
hr.symmetrical-hr:after {
    transform: translateX(calc(100% + 5px)) translateY(-50%);
}
実際の適用例
<hr class="symmetrical-hr">
hr.symmetrical-hr {
    position: relative;
    overflow: visible;
    border: none;
    width: 300px; 
    max-width: calc(33.333% - 10px);
    height: 10px;
    background: linear-gradient(to right, orange, red); 
    border-radius: 5px;
}
hr.symmetrical-hr:before,
hr.symmetrical-hr:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 1px;
    background: orangered; 
}
hr.symmetrical-hr:before {
    transform: translateX(calc(-100% - 5px)) translateY(-50%);
}
hr.symmetrical-hr:after {
    transform: translateX(calc(100% + 5px)) translateY(-50%);
}
実際の適用例