index-new.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LOCATION</title>
  6. <style type="text/css">
  7. #backImg{
  8. position: absolute;
  9. width: 100%;
  10. height: 100vh;
  11. box-sizing: border-box;
  12. padding: 10px;
  13. z-index:99;
  14. }
  15. .pop{
  16. position: absolute;
  17. width: 100%;
  18. height: 100vh;
  19. box-sizing: border-box;
  20. padding: 10px;
  21. z-index:1;
  22. background:rgba(64,225,243,0.1);
  23. }
  24. .titleBox{
  25. position: absolute;
  26. display: flex;
  27. width: 83%;
  28. height: 40px;
  29. top: 0px;
  30. right: 0px;
  31. z-index: 99;
  32. }
  33. #jscs,#msjg,#jtcx,#sthj,#csfz,#smxs,#zhgd,#yjgl,#sjgx,#zhzf{
  34. height:40px;
  35. width: 6.3%;
  36. /* background:rgba(255,0,0,0.2); */
  37. cursor: pointer;
  38. }
  39. #msjgSecond{
  40. display:none;
  41. width: 18%;
  42. position:absolute;
  43. z-index: 100;
  44. height: 25px;
  45. /* background: rgba(255,0,0,0.3); */
  46. left: 21%;
  47. top: 9%;
  48. }
  49. #msjgSecond #jiaoyu{
  50. cursor: pointer;
  51. display: inline-block;
  52. width: 40%;
  53. height: 100%;
  54. }
  55. #msjgSecond #yiliao{
  56. cursor: pointer;
  57. display: inline-block;
  58. width: 57%;
  59. height: 100%;
  60. }
  61. #jtcxSecond{
  62. display:none;
  63. width: 18%;
  64. position:absolute;
  65. z-index: 100;
  66. height: 25px;
  67. /* background: rgba(0,255,0,0.3); */
  68. left: 21%;
  69. top: 9%;
  70. }
  71. #jtcxSecond #shishi{
  72. cursor: pointer;
  73. display: inline-block;
  74. width: 22%;
  75. height: 100%;
  76. }
  77. #jtcxSecond #gongjiao{
  78. cursor: pointer;
  79. display: inline-block;
  80. width: 74%;
  81. height: 100%;
  82. }
  83. /* 生态环境 */
  84. #sthjSecond{
  85. display:none;
  86. width: 22%;
  87. position:absolute;
  88. z-index: 100;
  89. height: 25px;
  90. /* background: rgba(0,0,255,0.3); */
  91. left: 21%;
  92. top: 9%;
  93. }
  94. #sthjSecond #shui{
  95. cursor: pointer;
  96. display: inline-block;
  97. width: 35%;
  98. height: 100%;
  99. }
  100. #sthjSecond #kongqi{
  101. cursor: pointer;
  102. display: inline-block;
  103. width: 38%;
  104. height: 100%;
  105. }
  106. #sthjSecond #wuran{
  107. cursor: pointer;
  108. display: inline-block;
  109. width: 22%;
  110. height: 100%;
  111. }
  112. /* 市民心声 */
  113. #smxsSecond{
  114. display:none;
  115. width: 18%;
  116. position:absolute;
  117. z-index: 100;
  118. height: 25px;
  119. /* background: rgba(255,0,0,0.3); */
  120. left: 21%;
  121. top: 9%;
  122. }
  123. #smxsSecond #tousu{
  124. cursor: pointer;
  125. display: inline-block;
  126. width: 40%;
  127. height: 100%;
  128. }
  129. #smxsSecond #fenbu{
  130. cursor: pointer;
  131. display: inline-block;
  132. width: 57%;
  133. height: 100%;
  134. }
  135. </style>
  136. </head>
  137. <body>
  138. <div id="wrapper">
  139. <div id="interactive"></div>
  140. </div>
  141. <div class='pop'></div>
  142. <img id='backImg' src="./images/back.png" style="width: 100%;">
  143. <!-- <div class="box">
  144. <div class="skew"><div class="skew-main">用css3旋转写平行四边形</div></div>
  145. </div> -->
  146. <div class='titleBox'>
  147. <div id='jscs' onclick="toPage('jscs')"></div>
  148. <div id='msjg' onclick="toPage('msjg')"></div>
  149. <div id='jtcx' onclick="toPage('jtcx')"></div>
  150. <div id='sthj' onclick="toPage('sthj')"></div>
  151. <div id='csfz' onclick="toPage('csfz')"></div>
  152. <div id='smxs' onclick="toPage('smxs')"></div>
  153. <div id='zhgd' onclick="toPage('zhgd')"></div>
  154. <div id='yjgl' onclick="toPage('yjgl')"></div>
  155. <div id='sjgx' onclick="toPage('sjgx')"></div>
  156. <div id='zhzf' onclick="toPage('zhzf')"></div>
  157. </div>
  158. <div id='msjgSecond'>
  159. <span id='jiaoyu' onClick='toMsjgSecondPage(1)'></span>
  160. <span id='yiliao' onClick='toMsjgSecondPage(2)'></span>
  161. </div>
  162. <div id='jtcxSecond'>
  163. <span id='shishi' onClick='toJtcxSecondPage(1)'></span>
  164. <span id='gongjiao' onClick='toJtcxSecondPage(2)'></span>
  165. </div>
  166. <div id='sthjSecond'>
  167. <span id='shui' onClick='toSthjSecond(1)'></span>
  168. <span id='kongqi' onClick='toSthjSecond(2)'></span>
  169. <span id='wuran' onClick='toSthjSecond(3)'></span>
  170. </div>
  171. <div id='smxsSecond'>
  172. <span id='tousu' onClick='toSmxsSecond(1)'></span>
  173. <span id='fenbu' onClick='toSmxsSecond(2)'></span>
  174. </div>
  175. <script src="earth.js"></script>
  176. </body>
  177. <!-- 确保运行本地服务器上 -->
  178. <!-- -->
  179. </html>
  180. <script>
  181. var outerItem = 'jscs'
  182. function toPage(page){
  183. document.getElementById("msjgSecond").style.display="none";
  184. document.getElementById("jtcxSecond").style.display="none";
  185. document.getElementById("sthjSecond").style.display="none";
  186. document.getElementById("smxsSecond").style.display="none";
  187. outerItem = page;
  188. if(page == 'jscs'){
  189. document.getElementById("backImg").src="./images/back.png"
  190. }else{
  191. document.getElementById("backImg").src="./images/"+ page +".png"
  192. }
  193. var childs = document.getElementById(page).parentNode.childNodes
  194. for(var i in childs){
  195. if(i%2 == 1){
  196. childs[i].style.width = '6.3%'
  197. }
  198. }
  199. document.getElementById(page).style.width = '11.5%'
  200. if(page == 'msjg'){
  201. document.getElementById("msjgSecond").style.display="block";
  202. }else if(page == 'jtcx'){
  203. document.getElementById("jtcxSecond").style.display="block";
  204. }else if(page == 'sthj'){
  205. document.getElementById("sthjSecond").style.display="block";
  206. }else if(page == 'smxs'){
  207. document.getElementById("smxsSecond").style.display="block";
  208. }
  209. }
  210. // 民生机构
  211. function toMsjgSecondPage(num){
  212. toPage('msjg')
  213. if(num === 2){
  214. document.getElementById("backImg").src="./images/msjg2.png"
  215. }else{
  216. }
  217. }
  218. // 交通出行
  219. function toJtcxSecondPage(num){
  220. toPage('jtcx')
  221. if(num === 2){
  222. document.getElementById("backImg").src="./images/jtcx2.png"
  223. }else{
  224. }
  225. }
  226. // 生态环境
  227. function toSthjSecond(num){
  228. toPage('sthj')
  229. if(num === 1){
  230. document.getElementById("backImg").src="./images/sthj.png"
  231. }else if(num === 2){
  232. document.getElementById("backImg").src="./images/sthj2.png"
  233. }else if(num === 3){
  234. document.getElementById("backImg").src="./images/sthj3.png"
  235. }
  236. }
  237. // 市民心声
  238. function toSmxsSecond(num){
  239. toPage('msjg')
  240. if(num === 2){
  241. document.getElementById("backImg").src="./images/smxs2.png"
  242. }else{
  243. }
  244. }
  245. if(outerItem == 'jscs'){
  246. document.getElementById("backImg").src="./images/back.png"
  247. jscs.style.width ='11.5%'
  248. }
  249. </script>