所以這是我的索引文件:JavaScript中,有麻煩改變元素的風格
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="pragma" content="no-cache"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta charset="utf-8"/>
<title>TEST</title>
<style>
body {
background: #000000;
color:#cccccc;
margin: 0px;
padding: 0px;
border: 0px;
}
canvas {
image-rendering: optimizeSpeed;
-webkit-interpolation-mode: nearest-neighbor;
-ms-touch-action: none;
margin: 0px;
padding: 0px;
border: 0px;
}
:-webkit-full-screen #canvas {
width: 100%;
height: 100%;
}
div.gm4html5_div_class
{
margin: 0px;
padding: 0px;
border: 0px;
}
div.gm4html5_login
{
padding: 20px;
position: absolute;
border: solid 2px #000000;
background-color: #404040;
color:#00ff00;
border-radius: 15px;
box-shadow: #101010 20px 20px 40px;
}
div.gm4html5_cancel_button
{
float: right;
}
div.gm4html5_login_button
{
float: left;
}
div.gm4html5_login_header
{
text-align: center;
}
:-webkit-full-screen {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="gm4html5_div_class" id="gm4html5_div_id">
<canvas id="canvas" width="320" height="480">
<p>Your browser doesn't support HTML5 canvas.</p>
</canvas>
</div>
<script type="text/javascript" src="html5game/TEST.js?GPJZB=444106034"></script>
</body>
</html>
我似乎無法改變的div.gm4html5_div_class
使用JS的風格。我嘗試了一堆東西,但沒有運氣。
任何人都可以幫助我嗎? 另外請注意,這可能是因爲我不知道有足夠的瞭解JS ...
請包括您嘗試過/目前正在嘗試更改'div.gm4html5_div_class'' – haxxxton
的js「我嘗試了一堆東西......」名字? – smarx