Как остановить атрибут border-radius моей ссылки, влияющий на внутренний значок? - PullRequest
0 голосов
/ 19 апреля 2020

У меня есть кнопка с классом btn-play, у которой радиус границы 50%. Проблема в том, что это влияет на шрифт внутреннего шрифта. Края значка должны быть четкими по умолчанию, но они округлены. Я предполагаю, что это из-за радиуса границы 50%, но мне все еще нужно, чтобы это был круг вокруг иконки. Что я могу сделать?

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&family=Quantico:wght@400;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Quantico", sans-serif;
  margin-bottom: 20px;
}

p {
  font-size: 15px;
  color: #666;
  line-height: 26px;
  margin-bottom: 15px;
}

a {
  font-family: "Quantico", sans-serif;
  text-decoration: none;
  color: #111;
}

ul {
  list-style: none;
}

img {
  width: 100%;
  display: block;
}

/* Theme */
.container {
  margin: auto;
  max-width: 1500px;
  padding: 0 15px;
}

.logo {
  font-size: 30px;
  padding: 20px 0;
  float: left;
  margin: 0;
}

.shadow {
  box-shadow: 0px 5px 25px rgba(170, 170, 170, 0.1);
}

.main-color {
  color: #009603;
}

.btn {
  display: inline-block;
  text-transform: uppercase;
  background: #009603;
  color: #fff;
  padding: 14px 30px;
  font-weight: 700;
}

.btn-play {
  height: 100px;
  width: 100px;
  line-height: 100px;
  text-align: center;
  background: #009603;
  font-size: 30px;
  color: #ffffff;
  display: inline-block;
  border-radius: 50%;
  position: absolute;
  right: -50px;
  top: 50%;

  transform: translateY(-50px);
}

/* Nav */

nav {
  overflow: hidden;
  text-transform: uppercase;
}

nav ul {
  float: right;
}

nav ul li {
  float: left;
  margin-right: 32px;
  position: relative;
}

nav ul li a {
  display: block;
  padding: 31px 8px;
  font-weight: 700;
}

nav ul li a:after {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: #009603;
  content: "";
  opacity: 0;
  transition: all 0.3s;
}

nav ul li.active a:after {
  opacity: 1;
}

nav ul li:hover > a:after {
  opacity: 1;
}

/* Showcase */
#showcase {
  background: url("../img/bg.jpg") no-repeat center center/cover;
  height: 900px;
}

#showcase .showcase-content {
  color: #fff;
  text-align: center;
  padding-top: 300px;
}

#showcase .showcase-content h2 {
  font-size: 60px;
  font-weight: 700;
  text-transform: uppercase;
}

#showcase .showcase-content p {
  margin-bottom: 30px;
  line-height: 30px;
  color: #fff;
}

/* Features */
#features {
  padding-bottom: 60px;
}

#features .container {
  margin-top: -70px;
  max-width: 1400px;
  width: 100%;
  overflow: auto;
}

#features .box {
  background: #fff;
  float: left;
  max-width: 30%;
  margin: 0 15px 30px 15px;
  padding: 10px 10px 18px 10px;
  box-shadow: 0px 10px 25px rgba(206, 206, 206, 0.5);
  text-align: center;
}

#features .box img {
  margin-bottom: 28px;
}

#features .box h3 {
  color: #191039;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 30px;
}

/* Footer */
footer {
  padding-top: 70px;

  background-color: #000;
}

footer .container {
  max-width: 1400px;
}

footer .boxes {
  overflow: auto;
}

footer .f-box {
  float: left;
  width: 33.3%;
  margin-bottom: 30px;
  padding: 0 15px;
}

footer .logo {
  padding-top: 0;
  color: #fff;
  text-transform: uppercase;
  float: none;
}

footer p {
  color: #c4c4c4;
  margin-bottom: 20px;
}

footer .social i {
  color: #fff;
  margin-right: 20px;
}

footer h5 {
  color: #fff;
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 700px;
  margin-bottom: 35px;
  padding-top: 5px;
}

footer img {
  float: left;
  width: calc(33.33% - 5px);
  margin-right: 5px;
}

footer form {
  position: relative;
}

footer input {
  width: 100%;
  height: 50px;
  font-size: 15px;
  color: #c4c4c4;
  padding-left: 20px;
  border: 1px solid #009603;
  background: transparent;
}

footer input::placeholder {
  color: #c4c4c4;
}

footer input:focus {
  outline: none;
}

footer form button {
  font-size: 18px;
  color: #fff;
  background: #009603;
  height: 50px;
  width: 50px;
  border: none;
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;
}

footer .copyright {
  text-align: center;
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid #181d1d;
  clear: both;
}

footer span {
  color: #007bff;
}

/* About Page */

.nav2 {
  padding-top: 55px;
  padding-bottom: 100px;
}

.nav2 .container {
  max-width: 1400px;
}

.nav2 i {
  margin-right: 5px;
}

.nav2 a {
  font-size: 15px;
  color: #111111;
  margin-right: 5px;
  position: relative;
  font-family: "Open Sans", sans-serif;
}

.nav2 .icon {
  margin-left: 5px;
}

.nav2 .text {
  font-size: 15px;
  color: #888888;
}

#about {
  height: 1000px;
  overflow: hidden;
}

#about .about-img {
  width: 50%;
  background: url("../img/about.jpg") no-repeat center/cover;
  min-height: 100%;
  float: left;
  position: relative;
}

#about .about-text {
  width: 50%;
  float: right;
  background: #f5f5f5;
  min-height: 100%;
  padding-left: 100px;
  padding-right: 110px;
  padding-top: 60px;
}

#about .about-text h2 {
  line-height: 47px;
  margin-bottom: 30px;
  color: #111;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 36px;
}

#about .about-text p {
  color: #666666;
}

#about .list {
  margin-top: 40px;
}

#about .list .list-item {
  margin-bottom: 70px;
}

#about .list .list-item-pic {
  color: #009603;
  height: 100px;
  width: 100px;
  line-height: 120px;
  text-align: center;
  background: #ffffff;
  float: left;
  margin-right: 30px;
}

#about .list .list-item-text h5 {
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 20px;
  color: #111;
  font-weight: 700;
}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Pacocha | Garden Projects</title>
    <link rel="stylesheet" href="css/style.css" />
    <script
      src="https://kit.fontawesome.com/1685e275a4.js"
      crossorigin="anonymous"
    ></script>
  </head>
  <body>
    <header>
      <nav class="shadow">
        <div class="container">
          <a href="index.html">
            <h1 class="logo"><i class="fas fa-leaf main-color"></i> Pacocha</h1>
          </a>
          <ul>
            <li><a href="index.html">Home</a></li>
            <li class="active"><a href="about.html">About</a></li>
            <li><a href="services.html">Services</a></li>
          </ul>
        </div>
      </nav>
    </header>

    <div class="nav2">
      <div class="container">
        <a href="index.html"
          ><i class="fas fa-home"></i> Home <span class="icon">></span>
        </a>
        <span class="text">About</span>
      </div>
    </div>

    <!-- About -->
    <section id="about">
      <div class="about-img">
        <a href="http://www.youtube.com" class="btn-play">
          <i class="fa fa-play"></i>
        </a>
      </div>
      <div class="about-text">
        <h2>Garden Projects</h2>
        <p>
          Garden projects can add functional, fun, and fashionable accents to
          your landscape and even inside spaces. The possibilities are endless
          for a diy garden project, we have garden ideas that range from day to
          full weekend projects. To add character to your backyard choose garden
          projects that reflect your personal style.
        </p>
        <div class="list">
          <div class="list-item">
            <div class="list-item-pic">
              <i class="far fa-star fa-3x"></i>
            </div>
            <div class="list-item-text">
              <h5>Professionalism</h5>
              <p>
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam
                nostrum voluptate excepturi aliquid a tenetur libero corporis?
                Quod, doloribus ex?
              </p>
            </div>
          </div>
          <div class="list-item">
            <div class="list-item-pic">
              <i class="far fa-edit fa-3x"></i>
            </div>
            <div class="list-item-text">
              <h5>Decorating</h5>
              <p>
                Lorem ipsum dolor sit, amet consectetur adipisicing elit. Enim
                molestiae facere reiciendis recusandae error vel consequatur
                earum quibusdam animi explicabo.
              </p>
            </div>
          </div>
          <div class="list-item">
            <div class="list-item-pic">
              <i class="far fa-lightbulb fa-3x"></i>
            </div>
            <div class="list-item-text">
              <h5>Ideas</h5>
              <p>
                Lorem ipsum dolor sit, amet consectetur adipisicing elit. Enim
                molestiae facere reiciendis recusandae error vel consequatur
                earum quibusdam animi explicabo.
              </p>
            </div>
          </div>
          <div class="list-item">
            <div class="list-item-pic">
              <i class="far fa-trash-alt fa-3x"></i>
            </div>
            <div class="list-item-text">
              <h5>Cleaning</h5>
              <p>
                Lorem ipsum dolor sit, amet consectetur adipisicing elit. Enim
                molestiae facere reiciendis recusandae error vel consequatur
                earum quibusdam animi explicabo.
              </p>
            </div>
          </div>
        </div>
      </div>
    </section>

    <footer>
      <div class="container">
        <div class="boxes">
          <div class="f-box">
            <h1 class="logo"><i class="fas fa-leaf main-color"></i> Pacocha</h1>
            <p>
              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione
              corporis nostrum ex perferendis! Adipisci, molestias.
            </p>
            <div class="social">
              <a href="index.html"><i class="fab fa-facebook-f"></i></a>
              <a href="index.html"><i class="fab fa-twitter"></i></a>
              <a href="index.html"><i class="fab fa-youtube"></i></a>
              <a href="index.html"><i class="fab fa-instagram"></i></a>
            </div>
          </div>
          <div class="f-box">
            <h5>Instagram</h5>
            <img src="img/insta1.jpg" alt="" />
            <img src="img/insta2.jpg" alt="" />
            <img src="img/insta3.jpg" alt="" />
          </div>
          <div class="f-box">
            <h5>Subscribe</h5>
            <p>
              Lorem ipsum, dolor sit amet consectetur adipisicing elit.
              Necessitatibus, vel?
            </p>
            <form action="">
              <input type="email" placeholder="Email" />
              <button type="submit"><i class="fa fa-send"></i></button>
            </form>
          </div>
        </div>
        <div class="copyright">
          <p>Website made by <span>WebByDima</span></p>
        </div>
      </div>
    </footer>
  </body>
</html>

Я не знаю подробностей, чтобы добавить

Ответы [ 2 ]

2 голосов
/ 19 апреля 2020

это не влияет на значок шрифта. Значок по умолчанию закруглен, вы можете проверить его здесь: https://fontawesome.com/icons/play?style=solid

0 голосов
/ 19 апреля 2020

Значок уже закруглен, что вы имеете в виду?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...