如何使用HTML和CSS添加这些行?

huangapple go评论56阅读模式
英文:

How can I add these lines with HTML and CSS?

问题

我想要将类似这样的行添加到我的网页上,但不确定如何做插入图像描述

我不知道如何做这个。

英文:

I want to add lines like this to my webpage but unsure how to do soenter image description here

i dont know how to do this

答案1

得分: 1

你可以尝试这样做。

<!-- 开始片段:js 隐藏:false 控制台:true Babel:false -->

<!-- 语言:lang-css -->
main {
  width: 70%;
  margin: 0 auto;
  border-top: 1px solid red;
  border-bottom: 1px solid red;
  padding: 10px 0;
}

p {
  text-align: justify;
}

<!-- 语言:lang-html -->
<main>
  <p> Lorem Ipsum只是印刷和排版行业的虚拟文本。自从16世纪以来,Lorem Ipsum一直是该行业的虚拟文本标准,当时一名不知名的印刷工人拿起一本活字印刷的样本书并将其搅乱以制作成型样本书。</p>

  <h2>图片</h2>

  <p> Lorem Ipsum只是印刷和排版行业的虚拟文本。自从16世纪以来,Lorem Ipsum一直是该行业的虚拟文本标准,当时一名不知名的印刷工人拿起一本活字印刷的样本书并将其搅乱以制作成型样本书。 </p>
</main>

<!-- 结束片段 -->
英文:

You can try this.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

main {
  width: 70%;
  margin: 0 auto;
  border-top: 1px solid red;
  border-bottom: 1px solid red;
  padding: 10px 0;
}

p {
  text-align: justify;
}

<!-- language: lang-html -->

&lt;main&gt;
  &lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.&lt;/p&gt;

  &lt;h2&gt;IMAGE&lt;/h2&gt;

  &lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. &lt;/p&gt;
&lt;/main&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年2月8日 22:27:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75387213.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定