显示< H1> < H5>使用CSS文本内联内联、文本、LT、GT

2023-09-11 07:53:18 作者:金牌馬子

我要显示情感分析使得S要远远大于 H5 文本。

I want to show "Sentiment analysis" such that S should be much larger then h5 text.

有什么毛病follwing code:

What's wrong with follwing code:

HTML:

<h1>S</h1> <h5>entiment Analysis</h5>      

CSS:

h1 {
    margin-left: 36%;
    color:#C0C0C0;
    font-family: "calibri";
    text-decoration:underline;
    white-space: pre;
}

h5 {
    margin-left: 36%;
    color:#C0C0C0;
    font-family: "calibri";
    text-decoration:underline;
    white-space: pre;
}

直播$ C $在codePAN

推荐答案

这是一个混乱的code。如果你只想做第一个字母变大,你可以试试下面的。

That's a messy code. If you just want to make the first letter Bigger, You can try the following.

工作演示

Working Demo

HTML

<div>Sentiment analysis</div> 

CSS

div:first-letter {
  font-size:30px;
  font-weight:bold;
}