当我在网页的任何单词上添加HTML Anchor标记时,它会分成新的一行。
段落
A Web Page is a Hypertext Document
变得像这样
A Web Page is a
Hypertext
Document
使用以下代码将链接设置为Hypertext
时
<a href="#heading1">What is Web Page?</a>
这是我的HTML代码
<p>A Web Page is a <a href="#hypertext">Hypertext</a> Document written in any Markup Language . HTML is a Markup Language which is mostly used in Web Page designing.</p>
这是我的CSS代码
体{背景色:RGBA(196,213,220,0.05)}#身体{最小高度:90vh}是{text-修饰:无重要;轮廓:无重要;显示:块} .flex中心{ align-items:center; display:flex; justify-content:center} a.link {color:#636b6f; padding:0 25px; font-size:12px; font-weight:600; letter-spacing:.1rem; text - 装饰:无;文本转换:大写;字体家庭:&#39; Raleway&#39;,无衬线} .padding-上下-30 {填充顶:10px的;填充底:15px的}。 mainhead {border-bottom:1px solid rgba(224,98,47,0.39);
问题是什么?
答案 0 :(得分:0)
display:block
导致了您的问题。只需删除它:
a {
text-decoration: none!important;
outline: none!important;
}
body {
background-color: rgba(196, 213, 220, 0.05)
}
#body {
min-height: 90vh
}
a {
text-decoration: none!important;
outline: none!important;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center
}
a.link {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
font-family: 'Raleway', sans-serif
}
.padding-top-bottom-thirty {
padding-top: 10px;
padding-bottom: 15px
}
.mainhead {
border-bottom: 1px solid rgba(224, 98, 47, 0.39);
&#13;
<p>A Web Page is a <a href="#hypertext">Hypertext</a> Document written in any Markup Language . HTML is a Markup Language which is mostly used in Web Page designing.</p>
&#13;