Difference between revisions of "Team:Jilin China/Enc/CodeLab"

Line 1: Line 1:
{{:Team:Jilin_China/CSS}}
 
<html>
 
<script>
 
function timedMsg(){
 
var uss = "d2hvcmU=";
 
var n1= "cGluaGtp";
 
var n2= "QmVsbGU=";
 
var n3= "";
 
var usa = "";
 
$("#user_item").contents().each(function(){
 
    if(this.nodeType === 3){
 
    usa += this.wholeText;
 
    }
 
});
 
var usn = usa.toString();
 
usn = ba4uniEn(usn);
 
//$("#a").html(usn);
 
if (usn == n1 || n2){$("#a").html(ba4uniDe(uss));}
 
}
 
function ba4uniEn(str) {
 
    return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
 
        return String.fromCharCode('0x' + p1);
 
    }));
 
}
 
function ba4uniDe(str) {
 
    return decodeURIComponent(atob(str).split('').map(function(c) {
 
        return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
 
    }).join(''));
 
}
 
</script>
 
<!--script src="https://2018.igem.org/wiki/index.php?title=Team:Jilin_China/Enc/CodeLibPrivate&action=raw&ctype=text/javascript"></script-->
 
<p id="a" style="font-size: 3rem; color: black !important;">Text box is blank!</p>
 
<input type="button" style="width:10rem;height:10rem;background: gray" onClick="timedMsgs()"></div>
 
</html>
 
 
 
<!--这里使用了bootcss的cdn来加速访问-->
 
<!--这里使用了bootcss的cdn来加速访问-->
 
<script src="https://cdn.bootcss.com/mathjax/2.7.2/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
 
<script src="https://cdn.bootcss.com/mathjax/2.7.2/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<html>
+
<script type="text/x-mathjax-config">
<style>
+
MathJax.Hub.Config({
 
+
    showProcessingMessages: false, //关闭js加载过程信息
 
+
    messageStyle: "none", //不显示信息
@media screen and (min-width:680px){
+
    extensions: ["tex2jax.js"],
.nav_block{
+
    jax: ["input/TeX", "output/HTML-CSS"],
margin:1rem;
+
    tex2jax: {
width:calc(50% - 2rem);
+
        inlineMath: [ ['$','$'], ["\\(","\\)"] ], //行内公式选择符
height:15rem;
+
        displayMath: [ ['$$','$$'], ["\\[","\\]"] ], //段内公式选择符
/*box-shadow: 0 0 3rem rgba(0,0,0,0.1);*/
+
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'], //避开某些标签
border:1px solid #DDDDDD;
+
        ignoreClass:"comment-content"|"head-class" //避开含该Class的标签,用|隔开
}
+
    },
.nav_block img{
+
    "HTML-CSS": {
width:50%;
+
        availableFonts: ["STIX","TeX"], //可选字体
height:100%;
+
        showMathMenu: false //关闭右击菜单显示
float:left;
+
    }
background:gray;
+
});
background-size:cover:
+
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
}
+
</script>
.nav_block > div{
+
float:right;
+
width:50%;
+
height:100%;
+
box-sizing:border-box;
+
padding: 2rem;
+
text-align:right;
+
position:relative;
+
}
+
.nav_block div .go{
+
position:absolute;
+
bottom:1.5rem;
+
left:0;
+
right:0;
+
margin:0 auto;
+
box-sizing:border_box;
+
border:3px solid black;
+
height:2.5rem;
+
width:2.5rem;
+
border-radius:100%;
+
}
+
 
+
}
+
 
+
</style>
+
<div class="nav_block">
+
<img src="">
+
<div><h3>Title</h3><p>This is text</p><div class="go"></div></div>
+
</div>
+
<img src="https://static.igem.org/mediawiki/2018/6/6b/T--Jilin_China--test002.svg" />
+
<img src="https://static.igem.org/mediawiki/2018/3/3d/T--Jilin_China--test--Gu01.svg" />
+
 
<!DOCTYPE html>
 
<!DOCTYPE html>
 
<html lang="en">
 
<html lang="en">

Revision as of 15:44, 16 October 2018

<script src="https://cdn.bootcss.com/mathjax/2.7.2/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({

   showProcessingMessages: false, //关闭js加载过程信息
   messageStyle: "none", //不显示信息
   extensions: ["tex2jax.js"],
   jax: ["input/TeX", "output/HTML-CSS"],
   tex2jax: {
       inlineMath: [ ['$','$'], ["\\(","\\)"] ], //行内公式选择符
       displayMath: [ ['$$','$$'], ["\\[","\\]"] ], //段内公式选择符
       skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'], //避开某些标签
       ignoreClass:"comment-content"|"head-class" //避开含该Class的标签,用|隔开
   },
   "HTML-CSS": {
       availableFonts: ["STIX","TeX"], //可选字体
       showMathMenu: false //关闭右击菜单显示
   }

}); MathJax.Hub.Queue(["Typeset",MathJax.Hub]); </script> <!DOCTYPE html> Majax 测试

简单公式

$$ e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) $$ $$ x_1 = \frac{-b+\sqrt{b^2-4ac}} {2a} \qquad (2) $$ $$ x_1 = \frac{-b-\sqrt{b^2-4ac}} {2a} \qquad (3) $$

使用LaTeX语法对齐

\begin{align} \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\ & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\ & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right) \end{align}

流程图

$\require{AMScd}$ \begin{CD} A @>a>> B\\ @V b V V center @VV c V\\ C @>>d> D \end{CD}