Как показать левые двойные кавычки внутри кнопки? - PullRequest
1 голос
/ 19 июня 2020

Это то, что я пробовал.

body{
  background: lightblue;
  padding:0px;
  margin:0px;
}
span {  
  quotes: "“" "”" "‘" "’";
  font-family: sans-serif;
}
span::before {
    content: open-quote;
    font-size: 35px;
    vertical-align: -0.6rem;
}
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  <link rel="stylesheet" href="main.css"/>
</head>
<body>
  <div id="app">
    <div class="container">
      <div class="row">
        <div class="col-sm-6 offset-sm-3 d-flex justify-content-center">
          <button class="btn btn-primary mt-2">
            <span/> New Quote
          </button>
        </div>
      </div>
    </div>
  </div>
</body>
</html>

Независимо от того, что я меняю, я не могу удалить эту нижнюю прокладку.

Кроме того, я не могу получить такой точный вид, как на изображении. Имеется ли у изображения другое семейство шрифтов?

Мои ожидаемые результаты выглядят так, как показано ниже.

enter image description here

Спасибо

Ответы [ 2 ]

3 голосов
/ 19 июня 2020

уменьшить высоту строки:

body {
  background: lightblue;
  padding: 0px;
  margin: 0px;
}

span {
  quotes: "“" "”" "‘" "’";
  font-family: sans-seif;
}

span::before {
  content: open-quote;
  font-size: 35px;
  vertical-align: -0.7rem;
  line-height: 0.4;
}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  <link rel="stylesheet" href="main.css" />
</head>

<body>
  <div id="app">
    <div class="container">
      <div class="row">
        <div class="col-sm-6 offset-sm-3 d-flex justify-content-center">
          <button class="btn btn-primary mt-2">
            <span/> New Quote
          </button>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
0 голосов
/ 20 июня 2020

После стольких испытаний, наконец, получил.

Спасибо всем за вашу помощь.

body {
  background: lightblue;
  padding: 0px;
  margin: 0px;
}

span {
  quotes: "“" "”" "‘" "’";  
  font-family: sans-seif;
}

span::before {
  content: open-quote;
  font-size: 49px;
  vertical-align: -1.2rem;
  line-height: 0.4;
  font-family: sans-serif;
}

button{
  padding: 0px;
  height: 35px;
  padding: 0px 8px 0px 6px;
}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  <link rel="stylesheet" href="main.css" />
</head>

<body>
  <div id="app">
    <div class="container">
      <div class="row">
        <div class="col-sm-6 offset-sm-3 d-flex justify-content-center">
          <button class="mt-2">
            <span/>New Quote
          </button>
        </div>
      </div>
    </div>
  </div>
</body>

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