我想将谷歌仪表垂直对齐。这是我的 javascript 代码(它是从谷歌游乐场复制粘贴)
<script type='text/javascript'>
google.load('visualization', '1', {packages:['gauge']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Label', 'Value'],
['Memory', 80],
['CPU', 55],
['Network', 68]
]);
var options = {
width: 400, height: 120,
redFrom: 90, redTo: 100,
yellowFrom:75, yellowTo: 90,
minorTicks: 5
};
var chart = new google.visualization.Gauge(document.getElementById('menu2'));
chart.draw(data, options);
}
</script>
这是我的 html div
<div id="menu2"></div>
和CSS
#menu2
{
background-color:#FFD700;
height:570px;
width:150px;
float:right;
}
任何的想法?