将这段代码改为jQuery代码 <style type="text/css"> h1 { text-align: center; font-size: 40px; font-family:"楷体"; text-shadow: 5px 5px 5px #000000; } p { font-family: verdana; font-size: 20px; text-indent: 330px; font-family:"仿宋"; } .row p { display: inline-block; width: 4em; text-align: justify; text-align-last: justify; } body { font-family: "Lato", sans-serif,background="12(1).jpg"; } .sidenav { height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #111; overflow-x: hidden; transition: 0.5s; padding-top: 60px; } .sidenav a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: #818181; display: block; transition: 0.3s; } .sidenav a:hover, .offcanvas a:focus{ color: #f1f1f1; } .sidenav .closebtn { position: absolute; top: 0; right: 25px; font-size: 36px; margin-left: 50px; } #main { transition: margin-left .5s; padding: 16px; } @media screen and (max-height: 450px) { .sidenav {padding-top: 15px;} .sidenav a {font-size: 18px;} } img{ width:30px; height:40px; } </style>
时间: 2024-02-15 18:27:55 浏览: 68
$('head').append('<style type="text/css">h1{text-align:center;font-size:40px;font-family:"楷体";text-shadow:5px 5px 5px #000000;}p{font-family:verdana;font-size:20px;text-indent:330px;font-family:"仿宋";}.row p{display:inline-block;width:4em;text-align:justify;text-align-last:justify;}body{font-family:"Lato",sans-serif,background="12(1).jpg";} .sidenav{height:100%;width:0;position:fixed;z-index:1;top:0;left:0;background-color:#111;overflow-x:hidden;transition:0.5s;padding-top:60px;}.sidenav a{padding:8px 8px 8px 32px;text-decoration:none;font-size:25px;color:#818181;display:block;transition:0.3s;}.sidenav a:hover,.offcanvas a:focus{color:#f1f1f1;}.sidenav .closebtn{position:absolute;top:0;right:25px;font-size:36px;margin-left:50px;}#main{transition:margin-left .5s;padding:16px;}@media screen and (max-height:450px){.sidenav{padding-top:15px;}.sidenav a{font-size:18px;}}img{width:30px;height:40px;}</style>');
阅读全文