HTML& CSS:如何设置HR标签的样式以嵌入标题 [英] HTML & CSS: How to style an HR tag to have a title embedded in it

查看:211
本文介绍了HTML& CSS:如何设置HR标签的样式以嵌入标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建一个遵循以下模型的人力资源:

  -----< title& ------------------------------------------------- 

这是一个相当常见的UI模式,但我没有找到一个例子, HTML。有没有人有任何想法,甚至指向例子?我今天早上一直在谷歌搜索,到目前为止还没有找到我需要的。



哦,另外我想要一组表单输入。 p>

感谢!

解决方案

  ; fieldset> 
< legend> title< / legend>
< / fieldset>

然后,您可以对这些元素应用CSS以获得所需的效果


I'm trying to create an HR that follows the below model:

-----<title>-------------------------------------------------

This is a fairly common UI pattern but I'm not finding an example for how to make this work in HTML. Does anyone have any ideas or even pointers to examples? I've been googling it this morning and haven't found what I need so far.

Oh, and additionally I want it for a set of form inputs.

thanks!

解决方案

<fieldset>
     <legend>title</legend>
</fieldset>

You could then apply CSS to these elements to get the desired effect

这篇关于HTML&amp; CSS:如何设置HR标签的样式以嵌入标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆