我如何在其上创建倾斜的倾斜和标题文本?

问题描述 投票:0回答:2

.image {
  min-height: 100vh;
}

.bg-image {
  background-image: url('https://picsum.photos/1440/900');
  background-size: cover;
  background-position: center;
}
<!--About Us -->
<div class="container-fluid">
  <div class="row no-gutter">
    <div class="d-none d-md-flex col-md-4 col-lg-6 bg-image"></div>
    <div class="col-md-8 col-lg-6 remove-padding">
      <div class="page d-flex align-items-center py-5">
        <div class="container">
          <div class="row">
            <div class="col-md-9 col-lg-8 mx-auto">
              <h1 class="heading">About Us</h1>
              <p class="content"> 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>
              <p class="content">
                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>
              <p class="contents">
                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>
              <a href="#" class="button">
                <button class="btn btn-primary" type="button" name="button">Click here</button>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

我正在尝试进行斜角边框设计,我尝试使用偏斜,但对我的设计不起作用。请参考下面的代码行:

enter image description here

html css twitter-bootstrap user-interface border-layout
2个回答
2
投票

[检查一下,这可能有助于您开始使用:

以下面提到的种类创建一个div并在其中添加文本或header,您需要为成角度的东西使用的是linear-gradient,并带有所需成角度的deg


0
投票

这是我将通过使用skewX来实现的方式,只需将h1替换为代码中的类标题即可:

© www.soinside.com 2019 - 2024. All rights reserved.