English 中文(简体)
横划划划线中划线的中间线
原标题:Padding middle lines of a span
  • 时间:2012-05-25 15:50:30
  •  标签:
  • html
  • css

这是“% amp” 的后续活动;A 发现< a href="https://stackoverflow. com/ questions/93277666/how- to- remove- backflock- color- inlines- on- h1-tag/9327807#comment13943906_9327807> 这里。

是否有办法在中间线控制中间线的垫子? 它很难解释, 但也许我的< a href="https://jsfiddle.net/Mcd9F/39//" rel="nofollow norefererr" > fiddle 会帮助演示。 因此, 如果文本横跨三行, 我可以在第一行的开头和最后一行的结尾加上划线, 在 CSS 上划线。 但是中线的文字会拥抱背景颜色 。

我能不能到那里 在中间线上铺垫 像第一个和最后一个一样?

目标与此相似:

<h1>
<span>I can pad the beginning of the first line and end of the last line, but middle lines hug the edge!</span>
</h1>
h1{
    width:350px;
    margin: 5px;
    text-align: center;
}
h1 span
{
    background-color: #5577aa;
    color: #fff;
    line-height:32px;
    padding: 5px 25px 5px 35px;
    -moz-border-radius: 13px;
    font-size: 12pt;
    font-weight: bold;
    font-family:  Arial , sans;
    text-align: center;
}
最佳回答

您不能任意添加边框线条或将边框嵌入 word- wraps, 因为 HTML 元素实际上不会到此结束 。 如果您想要图中包含的内容, 您需要使用三个元素 。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签