html中元素和文本之间的空间
在编写 html 时,元素的内边距为零,边距为零,但文本周围有空格。我怎样才能摧毁它?
行高等。我尝试了功能,但没有用。
While writing html, the element has padding zero and margin is zero, but there are spaces around the text. How can I destroy it?
line height etc. I tried features but it didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否在提到的元素之前删除了页面的默认样式?
我认为这可能是问题。
在开始您的页面样式之前,最好的做法是删除所有样式并首先均匀的默认外观。
到目前为止,我一直在所有项目中使用代码。
这将删除整个网页的基本样式。复制并将上述代码粘贴到您的CSS文件中。
如果不是这种情况,则需要将 line-Height 属性添加到H1标签中。这是下面给出的片段。
Did you remove the page's default stylings before styling mentioned elements?
I think that may be the issue.
Before start styling of your page it is a best practice to remove all the styles and uniforming the default look first.
I've been using the code below for all of my projects up to this point.
This will remove basic stylings for the whole webpage.Copy and paste the above code into your CSS file.
If this is not the case, you need to add the line-height property to your h1 tag. Here is the snippet given below.
删除页面默认样式。
remove the page default styling.
使用以下 CSS 代码启动任何项目将为您节省大量时间。
It'll save you ton of time to start any of your projects with the below css codes.
默认情况下,HTML 在不同的标签中包含某些样式。
要从头开始创建项目,建议使用 CSS 重置文件。社区已经创建了几个。
这些文件重置了所有默认的 HTML 样式以及浏览器之间的不同变体,以在市场上最流行的浏览器中实现相同的视觉结果。
以下是用户 karbassi 通过 GitHub 提供的 CSS 重置:
https://gist.github.com/DavidWells /18e73022e723037a50d6
By default, HTML includes certain styles in the different tags.
To create a project from scratch, it is advisable to use a CSS reset file. The community has created several.
These files reset all the default styles of HTML and the different variants between browsers to achieve the same visual result in the most popular browsers on the market.
Here is a CSS reset offered by the user karbassi through GitHub:
https://gist.github.com/DavidWells/18e73022e723037a50d6