下面例子加上 body { height: 100px; }即可。但是我在aws的问题依然没结局。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#aws-portlet-id3196 {
display: none;
}
#aws-portlet-id3196 tbody {
width: 1700px !important;
}
;
#AWSWindow3196 {
width: 1700px !important;
}
;
/* body {
height: 100px;
} */
img.normal {
height: auto;
}
img.big {
height: 50%;
width: 50%;
}
img.small {
height: 100px;
width: 100px;
}
</style>
</head>
<body>
<img class="normal" src="./Apple.jpg" alt="">
<br/>
<img class="big" src="./Apple.jpg" alt="">
<br/>
<img class="small" src="./Apple.jpg" alt="">
</body>
<script>
window.onload = function() {
var sid = document.getElementsByName('sid')[0].value.split('_')[0];
if (sid == 'bella') {
document.getElementById('aws-portlet-id3196').style.display = "block";
}
}
</script>
</html>