CSS ul li horizontal horizontal
We often use ul li project tags in articles , like the "Related Topics Research" in this article is made using HTML ul li project tags , and the default presentation effect of ul li is vertical arrangement, if you want to modify it to horizontal horizontal arrangement must use CSS 's display inline syntax, this way are supported in all major browsers, in order to be able to clearly see the effects of the operation of the program, divided into the following CSS 's display inline with ul li two parts to explain, then Combining the two grammars together, you can see the horizontal and horizontal presentation of ul li.
CSS display inline syntax
<!--
#B ul li {
display:inline;
}
-->
</style>
<b>Preset style</b>
<ul>
<li>This is item one</li>
<li>This is item two</li>
</ul>
</div >
<div id="B">
<b>Horizontal and horizontal rendering</b>
<ul>
<li>Here is item one</li>
<li>Here is item two</li>
</ul>
</ div>
The above two paragraphs of grammar are combined together and written in the same HTML file. The results are as follows
●Here is item one
●Here is item two
horizontally presented
Here is item one Here is item two
Post a Comment
0 Comments