样式引号

man*_*uel 4 html css quotation-marks

我在设计引号时遇到了问题.所以我要做的是将引号相对于文本向下拉一点,以便它排成一行.我玩相对和绝对定位,但无法弄清楚.该程序将成为一个随机引用生成器,并且结束引用的位置必须使得它相对于文本以相同的方式排列,如果它有一个占用多行的引用.

body {
  background-color: rgb(44, 62, 80);
}
.quoteMachine {
  margin: 100px auto 0 auto;
  padding: 40px 60px;
  max-width: 600px;
  min-height: 225px;
  border-radius: 5px;
  background-color: white;
}
.theQuote {
  text-align: center;
  font-size: 30px;
  color: rgb(44, 62, 80);
}
.quotetationMarks {
  font-size: 60px;
  font-weight: 600;
}
.quoteAuthor {
  text-align: right;
  font-size: 20px;
  color: rgb(44, 62, 80);
}
.twitterButton {}
Run Code Online (Sandbox Code Playgroud)
<div class="quoteMachine">
  <div class="theQuote">
    <blockquote><span class="quotetationMarks">&ldquo;</span > They call me Mister Tiibs <span class="quotetationMarks">&rdquo;<span></blockquote>
      </div>
      <div class="quoteAuthor">
        - hello
      </div>
      <button class="twitterButton"></button>
      <button class="newQuoteButton"></button>
      
      
    </div>
Run Code Online (Sandbox Code Playgroud)

Cod*_*ike 5

由于spans为内联元素,你可以添加vertical-align: middle;到.quotetationMarks和将它们向下移动向字符串的其余部分的中间.

或者,您可以添加,position: relative; top: 10px;如果您需要更精确的控制.