使用CSS在标题后绘制线条

时间:2015-06-01 12:49:40

标签: html css css-shapes

如何像标题文字之后那样画一条线:

" TITLE ________"

CSS 中? " _"应该完成div的其余部分并填充剩余的空间。

3 个答案:

答案 0 :(得分:9)

基于this answer



weight = -1;   // so we can tell if a valid weight was given
while (weight < 0) {
    try {
        System.out.print("Write your weight: ");
        weight = input.nextDouble();
    }
    catch (InputMismatchException ex){
        System.out.print("You must write your weight in numbers.");
    }
}
&#13;
h1{
  overflow:hidden;
}
h1:after{
  content:'';
  display:inline-block;
  width:100%; height:100%;
  margin-right:-100%;
  border-bottom:1px solid #000;
}
&#13;
&#13;
&#13;

答案 1 :(得分:4)

&#13;
&#13;
update `mudasser` set `name`='Boknan', `ar_name`='بوكنان', `address`='E2', `type`='Abaya Galabia', `telephone`='2535338', `date_added`='2015-06-01 08:54:11', `image`='Boknan.jpg' where `id`='128'
&#13;
???????
&#13;
&#13;
&#13;

答案 2 :(得分:-1)

h1:after {
    content: "__________________";
}

进一步说明和示例::after pseudo class