在CSS中Xhtml代码不正常工作,如何正确格式化以使事情有效?

时间:2017-05-25 21:00:47

标签: html css xhtml

我只是在学习CSS,而且我不确定为什么事情的排序会影响我的页面上的工作方式。顶部元素总是出现,而其他元素不起作用。有时当我订购东西时,有两件事情会起作用,但通常一件人会工作另外两件事。我从头部开始,首先是这些元素。然后我有无序列表,然后是有序列表。我试图了解为什么会这样,以及我可以做些什么来解决我的问题。该段落工作正常。



ul {font-weight: bold;}

h1 {color: #c6c009;}

ol {font-style: italic;}

p {color: blue; font-family: courier; line-height: 130%;}

<p><img src="picture.jpg" height="200" /></p>

<h1> header </h1>
<p>paragraph.<br /> other part.</p>
<hr />
<h2> second header</h2>
<ul>
  <li>nyc</li>
  <li>boston</li>
  <li>philly</li>
  <li>baltimore</li>
</ul>

<ol>
  <li>nyc</li>
  <li>boston</li>
  <li>philly</li>
  <li>baltimore</li>
</ol>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

如果你的元素在其他元素中,你必须在你的css上定义它:

patientcase