請教 CSS inline, 改唔到 google maps 既排版.
我寫緊一個網頁, 例如想, 左邊放張相, 右邊放google map.
如上圖, 左手邊係相(上), google map(下).
但我想變成圖既右手邊咁, 相(左). google map(右).
我用 CSS 將 div 變做 inline, 但發覺會連 google map 都唔見左.- <!DOCTYPE HTML>
- <html lang="zh-Hant-HK">
- <head>
- <meta charset="utf-8">
- <title>google maps test</title>
- <style>
- div {display: block;} <!-- 試過呢度 block 做 inline , 但係會無左 googl maps -->
- </style>
- <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=FALSE"></script>
- <script type="text/javascript">
- function initialize() {
- var latlng = new google.maps.LatLng(22.274463,114.187483);
- var mapOptions = {
- zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP
- };
- var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
- }
- </script>
- </head>
- <body onload="initialize()">
- <div>
- <img width="200" height="200" src="a.jpg" />
- </div>
- <div id="map_canvas" style="width: 100px; height: 200px"></div>
- </body>
- </html>
複製代碼 |
|
|
附件:
您需要登錄才可以下載或查看附件。沒有帳號?註冊