I just found a problem when viewing a page using Safari. Normally, when I have code like:
<a href="someplace.html">
Someplace
</a>
I expect the browser to render the text as a link with no extra content. That's what Chrome and Firefox do. When using Safari though, that's not the case. Safari adds one space before and one after the text, like the following
.
I know Chrome adds space to the inspector too, but that's not the problem. The problem is that Safari actually renders the whitespace, which is a problem if your content breaks into multiple lines,
.
Is there a way to prevent this from happening or should I modify my code and put everything in a single line in order to avoid this problem?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.