zoukankan      html  css  js  c++  java
  • html中使用mathjax数学公式

    测试用例:
    test.html:

    <!DOCTYPE html>
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="./test.css" />
    <script type="text/x-mathjax-config">
          MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\(','\)']]}});
        </script>
        <script type="text/javascript"
          src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
        </script>
    </head>
    <body>
    <div id="header"><h1>备战NOIP普及组专用网站</h1></div>
    <div id="nav">
    <a href="/chusai">初赛知识</a><br>
    <a href="/fusai">复赛知识</a><br>
    <br>
    </div>
    <div id="section">
    <h1>公告</h1><br/>
    <p>这个网站对持续更新到今年11月份。</p>
    <p>希望能帮助大家在今年NOIP普及组取得好的成绩。</p>
    <p>When $a 
    e 0$, there are two solutions to (ax^2 + bx + c = 0) and they are
            $$x = {-b pm sqrt{b^2-4ac} over 2a}.$$</p>
    </div>
    <div id="footer">copyright zifeiy</div>
    </body>
    </html>
    

    测试css文件:test.css:

    <style>
    #header {
        background-color:black;
        color:white;
        text-align:center;
        padding:5px;
    }
    #nav {
        line-height:30px;
        background-color:#eeeeee;
        height:300px;
        80px;
        float:left;
        padding:5px;
    }
    #section {
        80%;
        float:left;
        padding:10px; 
        line-height: 5px;
    }
    #footer {
        background-color:black;
        color:white;
        clear:both;
        text-align:center;
        padding:5px;
    }
    </style>
    
  • 相关阅读:
    Maven常用命令
    SpringBoot实战(十三)之缓存
    python3对数据库的基本操作
    Microsoft visual c++ 14.0 is required问题
    python3之安装mysql问题
    如何将pip更新到最新版
    Java特性之继承的应用
    人人开源之代码生成器(renren-generator)
    《你凭什么做好互联网》之思维导图归纳
    GETOBJECTOPTIONS
  • 原文地址:https://www.cnblogs.com/zifeiy/p/11219676.html
Copyright © 2011-2022 走看看