如何在HTML和CSS中完成此图像?(How can I get this image done in HTML and CSS?)

编程入门 行业动态 更新时间:2024-10-06 14:35:35
如何在HTML和CSS中完成此图像?(How can I get this image done in HTML and CSS?)

我有这个图像,将在HTML和CSS中实现。

这就是我的尝试。

    <span>$</span><span style="font-size: 50px;">99</span><span style="vertical-align: text-top;">00</span> 
  
 

但实际上这并不像我想要的那样。

I have this image that is to be implemented in HTML and CSS.

This is what I have tried.

    <span>$</span><span style="font-size: 50px;">99</span><span style="vertical-align: text-top;">00</span> 
  
 

But this actually doesn't turn out like I want in the image.

最满意答案

例如:

.price {
  font-size: 80px;
  color: #f60;
}
.price sup {
  font-size: 38px;
}
.price sub {
  font-size: 28px;
  color: #aaa;
  position: absolute;
  display: inline-block;
  margin: 48px 0 0 -40px;
} 
  
<span class="price"><sup>$</sup>99<sup>00</sup><sub>/month</sub></span> 
  
 

http://jsfiddle.net/1zjuddj8

For example:

.price {
  font-size: 80px;
  color: #f60;
}
.price sup {
  font-size: 38px;
}
.price sub {
  font-size: 28px;
  color: #aaa;
  position: absolute;
  display: inline-block;
  margin: 48px 0 0 -40px;
} 
  
<span class="price"><sup>$</sup>99<sup>00</sup><sub>/month</sub></span> 
  
 

http://jsfiddle.net/1zjuddj8

更多推荐

span><span,span>,电脑培训,计算机培训,IT培训"/> <meta name="des

本文发布于:2023-08-07 11:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464067.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   如何在   CSS   HTML   image

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!