如何在c1的右下角给我的h1边框?

时间:2019-04-15 08:18:36

标签: css border html-heading

我需要一个html中的h1元素的角。您可以在图片上看到示例。我该如何使用CSS?

https://i.imgur.com/wUoGwx9.png“ h1示例”

2 个答案:

答案 0 :(得分:1)

使用多个背景:

h1 {
  background-image:
    linear-gradient(blue,blue),
    linear-gradient(blue,blue);
  background-position:bottom right;
  background-size:3px 20px,20px 3px;
  background-repeat:no-repeat;
  
  display:inline-block;
  padding:0 5px;
}
<h1>Some text here</h1>

答案 1 :(得分:-4)

非常简单。您可以将元素包装到元素中,并使用border-bottomborder-right为其分配边框。 顺便说一句。这是一个基本问题。

这是一个小提琴:https://jsfiddle.net/gyat67vd/1/