【问题标题】:Flexbox with expandable header and footer and a scrolling body具有可扩展页眉和页脚以及滚动体的 Flexbox
【发布时间】:2018-12-29 04:39:33
【问题描述】:

我正在尝试创建一个全高 div (.wrapper),其中包含页眉、正文和页脚,根据内容,页眉/页脚应该展开/缩小,如果溢出,正文应该滚动,

或者换句话说

我不希望容器 div 滚动,只有 body 应该在溢出时滚动。

.wrapper {
  position: absolute;
  top: 0;
  width: 50%;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  box-shadow: 0 0 10px 1px #7f7f7f;
}

.wrapper .blade-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #7f7f7f;
  border-bottom: none;
  align-self: strech;
}

.wrapper .blade-container .blade-header {
  display: flex;
  background-color: black;
  color: white;
  justify-content: space-between;
  padding: 5px;
}

.wrapper .blade-container .blade-header .header-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "Segoe UI", "Segoe UI Light", "Segoe WP Light", "Segoe WP", Tahoma, Arial, sans-serif;
}

.wrapper .blade-container .blade-header .header-title .header-title-wrapper {
  width: 100%;
  color: inherit;
}

.wrapper .blade-container .blade-header .header-actions {
  display: flex;
}

.wrapper .blade-container .blade-header .header-actions .action-button {
  display: flex;
  height: 30px;
  width: 30px;
  background-color: transparent;
  justify-content: center;
  align-items: center;
  transition: background-color 0.4s ease-out;
  cursor: pointer;
}

.wrapper .blade-container .blade-header .header-actions .action-button:hover {
  background: rgba(230, 230, 230, 0.3);
}

.wrapper .blade-container .blade-header .header-actions .danger:hover {
  background-color: #aa0000 !important;
}

.wrapper .blade-container .blade-body {
  display: flex;
  padding: 5px;
  height: 100%;
  background-color: white;
}

.wrapper .blade-container .blade-body .blade-body-wrapper {
  width: 100%;
  height: 100%;
  background-color: inherit;
  overflow-y: auto;
}

.wrapper .blade-container .blade-footer {
  display: flex;
  align-self: stretch;
  color: white;
}

.wrapper .blade-container .blade-footer .blade-footer-wrapper {
  padding: 3px;
  width: 100%;
  height: 100%;
  background-color: #323232;
}
<div class="wrapper">
  <div class="blade-container">
    <div class="blade-header">
      <div class="header-title">
        <div class="header-title-wrapper">
          Lorem Ipsum
        </div>
      </div>
      <div class="header-actions">
        <span class="action-button">
          <b>&#x0229f;</b>
        </span>
        <span class="action-button" (click)="onMaximize()">
          <b>&#x0229E;</b>
        </span>
        <span class="action-button danger" id="ngxBladeCloseBtn">
          <b>&times;</b>
        </span>
      </div>
    </div>
    <div class="blade-body">
      <div class="blade-body-wrapper">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'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.
          It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
          desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

        Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using
        'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their
        infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

        <h3> Where does it come from? </h3>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
          up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
          Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
          a line in section 1.10.32.</p>

        <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English
          versions from the 1914 translation by H. Rackham.
        </p>

        <h3> Where can I get some? </h3>
        <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem
          Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It
          uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic
          words etc.</p>
      </div>
    </div>
    <div class="blade-footer">
      <div class="blade-footer-wrapper">
        <h3> Footer </h3>
        "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal
        blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled
        and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that
        pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
      </div>
    </div>
  </div>
</div>

现在我也得到了一个包装器的滚动条,我该如何避免它?

我尝试将overflow-y: hidden 设置为.wrapper,但它只是隐藏了页脚。

对于冗长的代码,我很抱歉,这是一个使用ng-content 的角度组件,因此在页眉、正文和页脚中添加了所有额外的包装类。

Codepen

【问题讨论】:

  • 嗨网络;除非您的问题具体是如何在 Sass 本身中完成此操作,否则您能否提供编译后的 CSS?
  • @TylerH 使用已编译的 CSS 更新问题
  • .wrapper 中将overflow-y: auto; 更改为overflow: hidden; 不能达到您想要的效果吗?
  • @CodeCheshire 试过了,当页脚有很多内容时,wrapper 仍然滚动

标签: html css flexbox


【解决方案1】:

像这样:

删除了bottom:0

.wrapper {
  position: absolute;
  top: 0;
  width: 50%;
  right: 0;
  overflow-y: auto;
  box-shadow: 0 0 10px 1px #7f7f7f;
}
.wrapper .blade-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #7f7f7f;
  border-bottom: none;
  align-self: strech;
}
.wrapper .blade-container .blade-header {
  display: flex;
  background-color: black;
  color: white;
  justify-content: space-between;
  padding: 5px;
}
.wrapper .blade-container .blade-header .header-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "Segoe UI", "Segoe UI Light", "Segoe WP Light", "Segoe WP", Tahoma, Arial, sans-serif;
}
.wrapper .blade-container .blade-header .header-title .header-title-wrapper {
  width: 100%;
  color: inherit;
}
.wrapper .blade-container .blade-header .header-actions {
  display: flex;
}
.wrapper .blade-container .blade-header .header-actions .action-button {
  display: flex;
  height: 30px;
  width: 30px;
  background-color: transparent;
  justify-content: center;
  align-items: center;
  transition: background-color 0.4s ease-out;
  cursor: pointer;
}
.wrapper .blade-container .blade-header .header-actions .action-button:hover {
  background: rgba(230, 230, 230, 0.3);
}
.wrapper .blade-container .blade-header .header-actions .danger:hover {
  background-color: #aa0000 !important;
}
.wrapper .blade-container .blade-body {
  display: flex;
  padding: 5px;
  height: 100%;
  background-color: white;
}
.wrapper .blade-container .blade-body .blade-body-wrapper {
  width: 100%;
  height: 100%;
  background-color: inherit;
  overflow-y: auto;
}
.wrapper .blade-container .blade-footer {
  display: flex;
  align-self: stretch;
  color: white;
}
.wrapper .blade-container .blade-footer .blade-footer-wrapper {
  padding: 3px;
  width: 100%;
  height: 100%;
  background-color: #323232;
}
<div class="wrapper">
  <div class="blade-container">
    <div class="blade-header">
      <div class="header-title">
        <div class="header-title-wrapper">
          Lorem Ipsum
        </div>
      </div>
      <div class="header-actions">
        <span class="action-button">
          <b>&#x0229f;</b>
        </span>
        <span class="action-button" (click)="onMaximize()">
          <b>&#x0229E;</b>
        </span>
        <span class="action-button danger" id="ngxBladeCloseBtn">
          <b>&times;</b>
        </span>
      </div>
    </div>
    <div class="blade-body">
      <div class="blade-body-wrapper">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'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.
          It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
          desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

        Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using
        'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their
        infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

        <h3> Where does it come from? </h3>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
          up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
          Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
          a line in section 1.10.32.</p>

        <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English
          versions from the 1914 translation by H. Rackham.
        </p>

        <h3> Where can I get some? </h3>
        <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem
          Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It
          uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic
          words etc.</p>
      </div>
    </div>
    <div class="blade-footer">
      <div class="blade-footer-wrapper">
        <h3> Footer </h3>
        "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal
        blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled
        and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that
        pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
      </div>
    </div>
  </div>
</div>

【讨论】:

  • 这使得.wrapper 滚动,我想要实现的是只滚动blade-body。即使正文内容溢出,页脚和页眉仍应可见,wrapper 不应滚动。
  • 好吧,我刚刚意识到,如果在 blade-body 上没有 min-height,我想要实现的目标是不可行的,尤其是在较小的屏幕上。在我的情况下,这是最好的解决方案,谢谢队友:)
【解决方案2】:

如果您希望 .blade-body 滚动,请删除 height: 100%; 并使用 flex:1; + overflow:scroll;

.wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  right: 0;
  overflow-y: auto;
  box-shadow: 0 0 10px 1px #7f7f7f;
}
.wrapper .blade-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #7f7f7f;
  border-bottom: none;
  align-self: strech;
}
.wrapper .blade-container .blade-header {
  display: flex;
  background-color: black;
  color: white;
  justify-content: space-between;
  padding: 5px;
}
.wrapper .blade-container .blade-header .header-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "Segoe UI", "Segoe UI Light", "Segoe WP Light", "Segoe WP",
    Tahoma, Arial, sans-serif;
}
.wrapper .blade-container .blade-header .header-title .header-title-wrapper {
  width: 100%;
  color: inherit;
}
.wrapper .blade-container .blade-header .header-actions {
  display: flex;
}
.wrapper .blade-container .blade-header .header-actions .action-button {
  display: flex;
  height: 30px;
  width: 30px;
  background-color: transparent;
  justify-content: center;
  align-items: center;
  transition: background-color 0.4s ease-out;
  cursor: pointer;
}
.wrapper .blade-container .blade-header .header-actions .action-button:hover {
  background: rgba(230, 230, 230, 0.3);
}
.wrapper .blade-container .blade-header .header-actions .danger:hover {
  background-color: #aa0000 !important;
}
.wrapper .blade-container .blade-body {
  display: flex;
  padding: 5px;
  flex: 1;
  overflow: auto;
  background-color: white;
  border: solid red;
}
.wrapper .blade-container .blade-body .blade-body-wrapper {
  width: 100%;
  height: 100%;
  background-color: inherit;
  overflow-y: auto;
}
.wrapper .blade-container .blade-footer {
  display: flex;
  align-self: stretch;
  color: white;
}
.wrapper .blade-container .blade-footer .blade-footer-wrapper {
  padding: 3px;
  width: 100%;
  height: 100%;
  background-color: #323232;
}
<div class="wrapper">
  <div class="blade-container">
    <div class="blade-header">
      <div class="header-title">
        <div class="header-title-wrapper">
          Lorem Ipsum
        </div>
      </div>
      <div class="header-actions">
        <span class="action-button">
          <b>&#x0229f;</b>
        </span>
        <span class="action-button" (click)="onMaximize()">
          <b>&#x0229E;</b>
        </span>
        <span class="action-button danger" id="ngxBladeCloseBtn">
          <b>&times;</b>
        </span>
      </div>
    </div>
    <div class="blade-body">
      <div class="blade-body-wrapper">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'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.
          It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
          desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

        Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using
        'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their
        infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

        <h3> Where does it come from? </h3>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
          up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
          Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
          a line in section 1.10.32.</p>

        <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English
          versions from the 1914 translation by H. Rackham.
        </p>

        <h3> Where can I get some? </h3>
        <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem
          Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It
          uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic
          words etc.</p>
      </div>
    </div>
    <div class="blade-footer">
      <div class="blade-footer-wrapper">
        <h3> Footer </h3>
        "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal
        blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled
        and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that
        pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
      </div>
    </div>
  </div>
</div>

此外,设置一些min-height 可能是明智之举,因此内容在较小的屏幕上仍然可见

.wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  right: 0;
  overflow-y: auto;
  box-shadow: 0 0 10px 1px #7f7f7f;
}
.wrapper .blade-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #7f7f7f;
  border-bottom: none;
  align-self: strech;
}
.wrapper .blade-container .blade-header {
  display: flex;
  background-color: black;
  color: white;
  justify-content: space-between;
  padding: 5px;
}
.wrapper .blade-container .blade-header .header-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "Segoe UI", "Segoe UI Light", "Segoe WP Light", "Segoe WP",
    Tahoma, Arial, sans-serif;
}
.wrapper .blade-container .blade-header .header-title .header-title-wrapper {
  width: 100%;
  color: inherit;
}
.wrapper .blade-container .blade-header .header-actions {
  display: flex;
}
.wrapper .blade-container .blade-header .header-actions .action-button {
  display: flex;
  height: 30px;
  width: 30px;
  background-color: transparent;
  justify-content: center;
  align-items: center;
  transition: background-color 0.4s ease-out;
  cursor: pointer;
}
.wrapper .blade-container .blade-header .header-actions .action-button:hover {
  background: rgba(230, 230, 230, 0.3);
}
.wrapper .blade-container .blade-header .header-actions .danger:hover {
  background-color: #aa0000 !important;
}
.wrapper .blade-container .blade-body {
  display: flex;
  padding: 5px;
  flex: 1;
  overflow: auto;
  min-height:50vh;
  background-color: white;
  border: solid red;
}
.wrapper .blade-container .blade-body .blade-body-wrapper {
  width: 100%;
  height: 100%;
  background-color: inherit;
  overflow-y: auto;
}
.wrapper .blade-container .blade-footer {
  display: flex;
  align-self: stretch;
  color: white;
}
.wrapper .blade-container .blade-footer .blade-footer-wrapper {
  padding: 3px;
  width: 100%;
  height: 100%;
  background-color: #323232;
}
<div class="wrapper">
  <div class="blade-container">
    <div class="blade-header">
      <div class="header-title">
        <div class="header-title-wrapper">
          Lorem Ipsum
        </div>
      </div>
      <div class="header-actions">
        <span class="action-button">
          <b>&#x0229f;</b>
        </span>
        <span class="action-button" (click)="onMaximize()">
          <b>&#x0229E;</b>
        </span>
        <span class="action-button danger" id="ngxBladeCloseBtn">
          <b>&times;</b>
        </span>
      </div>
    </div>
    <div class="blade-body">
      <div class="blade-body-wrapper">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'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.
          It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
          desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

        Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using
        'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their
        infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

        <h3> Where does it come from? </h3>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
          up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
          Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
          a line in section 1.10.32.</p>

        <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English
          versions from the 1914 translation by H. Rackham.
        </p>

        <h3> Where can I get some? </h3>
        <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem
          Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It
          uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic
          words etc.</p>
      </div>
    </div>
    <div class="blade-footer">
      <div class="blade-footer-wrapper">
        <h3> Footer </h3>
        "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal
        blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled
        and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that
        pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
      </div>
    </div>
  </div>
</div>

【讨论】:

    猜你喜欢
    • 2018-05-19
    • 2017-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    • 2016-09-13
    • 1970-01-01
    相关资源
    最近更新 更多