段落正在复制其上方列表的属性

时间:2019-01-25 19:17:46

标签: html styles paragraph

出于某种原因,我无序列表下面的段落中的文本继承了列表上方列表中最后一项的属性。包括事实,它是链接和文本本身的颜色。最初在列表的最后一项是白色,但出于能见度,我将其更改为粉色。任何帮助,将不胜感激。

我试图将段落中的文本设置为不同的颜色,但这没有任何作用。

SELECT * INTO #Tbl1
FROM (VALUES    
(1       ,'  X     ',3     , 4),
(2       ,'  Y     ',2     , 1),
(3       ,'  Z     ',4     , 2),
(4       ,'  P     ',1     , 3))
x(Id     ,Name,Id1     ,Id2)

SELECT t.id, t.Name, t1.Name, t2.Name
FROM #Tbl1 as t
INNER JOIN #Tbl1 as t1 ON t.Id1 = t1.Id
INNER JOIN #Tbl1 as t2 ON t.Id2 = t2.Id

2 个答案:

答案 0 :(得分:0)

关闭您的<a>标签

<ul style="list-style-type: none;margin: 0;padding: 0; color:color:#ff00ff; background-color:darkblue;">
  <li style=display:inline;> <a href="" style="color:white;"> Home</a> </li>
  <li style=display:inline;> <a href="" style="color:white;"> Education</a> </li>
  <li style=display:inline;> <a href="" style="color:white;"> Work Experience</a> </li>
  <li style=display:inline;> <a href="" style="color:pink;"> Hobbies</a> </li>
</ul>

<article>
  <p> BLANK is a student at BLANK <br> He is currently enrolled in the Computer Information Systems <br> program at the school. He is expected to graduate in 2019. </p>
</article>

答案 1 :(得分:0)

<body>
  <ul style="list-style-type: none;margin: 0;padding: 0; color:color:#ff00ff; background-color:darkblue">
    <li style="display:inline"> <a href="" style="color:white"> Home</a> </li>
    <li style="display:inline"> <a href="" style="color:white"> Education</a> </li>
    <li style="display:inline"> <a href="" style="color:white"> Work Experience</a> </li>
    <li style="display:inline"> <a href="" style="color:pink"> Hobbies</a> </li>
  </ul>


  <article>
    <p> BLANK is a student at BLANK <br> He is currently enrolled in the Computer Information Systems <br> program at the school. He is expected to graduate in 2019. </p>
  </article>

</body>

您在样式属性上缺少一些引号,而罪魁祸首是您没有<a>标签的结束标签