首頁  >  文章  >  web前端  >  html怎麼達到上角標效果

html怎麼達到上角標效果

王林
王林轉載
2020-10-22 18:43:384266瀏覽

html怎麼達到上角標效果

先來看看效果:

#(推薦教學:html影片教學

實作程式碼:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>制作角标的方法</title>
    <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
    <style>
          .con{
            height: 250px;
            width: 200px;
            margin: 0 auto;
            overflow: hidden;
            margin-top: 100px;
            position: relative;
            background-color: #4cd964;
          }
      .subscript{
        color: #fff;
        height: 30px;
        width: 100px;
        position: absolute;
        right: -30px;
        text-align: center;
        line-height: 30px;
        font-family: "黑体";
        background-color: #0c60ee;
        -moz-transform:rotate(45deg);
        -webkit-transform:rotate(45deg);
        -o-transform:rotate(45deg);
        -ms-transform:rotate(45deg);
        transform:rotate(45deg);
      }
    </style>
</head>
<body>
<div>
    <div>
      角标
    </div>
</div>
</body>
</html>

相關推薦:html教學

#

以上是html怎麼達到上角標效果的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:csdn.net。如有侵權,請聯絡admin@php.cn刪除