<html>
<head>
<style>
#round{
width:300px
height:200px
}
</style>
</head>
<script>
var oDiv = document.getElementById('round')
oDiv.style.width = 400px //通过js改变这个div的宽度
</script>
<body>
<div id='round'>
<p>我是测试文字</p>
</div>
</body>
</html>
<pre><code class="language-bash">
xxxx
</code>
</pre>
<script>
window.onload=function(){
var codes=document.getElementsByTagName("code")
for(var i in codes){
if(codes[i].className&&codes[i].className.indexOf("language-bash")>-1){
codes[i].parentNode.className="command-line language-bash"
codes[i].parentNode.dataset.user="root"
codes[i].parentNode.dataset.host="localhost"
}
}
}
</script>