Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]generowanie mapy z divami i zdjęciami
ghastblood
post
Post #1





Grupa: Zarejestrowani
Postów: 360
Pomógł: 12
Dołączył: 17.09.2009
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Witam jak najlepiej generować układ divów pod mapę

wrzucam mój kod html z układem divów


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  4. <meta http-equiv="imagetoolbar" content="no" />
  5. <title>Mapa</title>
  6. <link rel="stylesheet" type="text/css" href="styles.css" />
  7. </head>
  8. <div id="map_container" style="overflow: visible;">
  9. <div style="position: absolute; width: 265px; height: 190px;">
  10. <div class="map_border" style="z-index: 3; position: absolute; width: 1px; height: 190px; left: 0px; top: 0px;"></div>
  11. <div class="map_border" style="z-index: 3; position: absolute; width: 265px; height: 1px; left: 0px; top: 0px;"></div>
  12. <img style="position: absolute; z-index: 2; left: 0px; top: 0px;" src="img/gras4.png">
  13. <img style="position: absolute; z-index: 2; left: 0px; top: 38px;" src="img/gras4.png">
  14. <img style="position: absolute; z-index: 2; left: 0px; top: 76px;" src="img/gras4.png">
  15. <img style="position: absolute; z-index: 2; left: 0px; top: 114px;" src="img/gras4.png">
  16. <img style="position: absolute; z-index: 2; left: 0px; top: 152px;" src="img/gras4.png">
  17. <img style="position: absolute; z-index: 2; left: 53px; top: 0px;" src="img/gras4.png">
  18. <img style="position: absolute; z-index: 2; left: 53px; top: 38px;" src="img/gras4.png">
  19. <img style="position: absolute; z-index: 2; left: 53px; top: 76px;" src="img/gras4.png">
  20. <img style="position: absolute; z-index: 2; left: 53px; top: 114px;" src="img/gras4.png">
  21. <img style="position: absolute; z-index: 2; left: 53px; top: 152px;" src="img/gras4.png">
  22. <img style="position: absolute; z-index: 2; left: 106px; top: 0px;" src="img/gras4.png">
  23. <img style="position: absolute; z-index: 2; left: 106px; top: 38px;" src="img/gras4.png">
  24. <img style="position: absolute; z-index: 2; left: 106px; top: 76px;" src="img/gras4.png">
  25. <img style="position: absolute; z-index: 2; left: 106px; top: 114px;" src="img/gras4.png">
  26. <img style="position: absolute; z-index: 2; left: 106px; top: 152px;" src="img/gras4.png">
  27. <img style="position: absolute; z-index: 2; left: 159px; top: 0px;" src="img/gras4.png">
  28. <img style="position: absolute; z-index: 2; left: 159px; top: 38px;" src="img/v4.png">
  29. <img style="position: absolute; z-index: 2; left: 159px; top: 76px;" src="img/gras4.png">
  30. <img style="position: absolute; z-index: 2; left: 159px; top: 114px;" src="img/gras4.png">
  31. <img style="position: absolute; z-index: 2; left: 159px; top: 152px;" src="img/gras4.png">
  32. <img style="position: absolute; z-index: 2; left: 212px; top: 0px;" src="img/gras4.png">
  33. <img style="position: absolute; z-index: 2; left: 212px; top: 38px;" src="img/gras4.png">
  34. <img style="position: absolute; z-index: 2; left: 212px; top: 76px;" src="img/gras4.png">
  35. <img style="position: absolute; z-index: 2; left: 212px; top: 114px;" src="img/gras4.png">
  36. <img style="position: absolute; z-index: 2; left: 212px; top: 152px;" src="img/gras4.png">
  37. </div>
  38. <div style="position: absolute; width: 265px; height: 190px; left:273px;">
  39. <div class="map_border" style="z-index: 3; position: absolute; width: 1px; height: 190px; left: 0px; top: 0px;"></div>
  40. <div class="map_border" style="z-index: 3; position: absolute; width: 265px; height: 1px; left: 0px; top: 0px;"></div>
  41. <img style="position: absolute; z-index: 2; left: 0px; top: 0px;" src="img/gras4.png">
  42. <img style="position: absolute; z-index: 2; left: 0px; top: 38px;" src="img/gras4.png">
  43. <img style="position: absolute; z-index: 2; left: 0px; top: 76px;" src="img/gras4.png">
  44. <img style="position: absolute; z-index: 2; left: 0px; top: 114px;" src="img/gras4.png">
  45. <img style="position: absolute; z-index: 2; left: 0px; top: 152px;" src="img/gras4.png">
  46. <img style="position: absolute; z-index: 2; left: 53px; top: 0px;" src="img/gras4.png">
  47. <img style="position: absolute; z-index: 2; left: 53px; top: 38px;" src="img/gras4.png">
  48. <img style="position: absolute; z-index: 2; left: 53px; top: 76px;" src="img/gras4.png">
  49. <img style="position: absolute; z-index: 2; left: 53px; top: 114px;" src="img/gras4.png">
  50. <img style="position: absolute; z-index: 2; left: 53px; top: 152px;" src="img/gras4.png">
  51. <img style="position: absolute; z-index: 2; left: 106px; top: 0px;" src="img/gras4.png">
  52. <img style="position: absolute; z-index: 2; left: 106px; top: 38px;" src="img/gras4.png">
  53. <img style="position: absolute; z-index: 2; left: 106px; top: 76px;" src="img/gras4.png">
  54. <img style="position: absolute; z-index: 2; left: 106px; top: 114px;" src="img/gras4.png">
  55. <img style="position: absolute; z-index: 2; left: 106px; top: 152px;" src="img/gras4.png">
  56. <img style="position: absolute; z-index: 2; left: 159px; top: 0px;" src="img/gras4.png">
  57. <img style="position: absolute; z-index: 2; left: 159px; top: 38px;" src="img/v4.png">
  58. <img style="position: absolute; z-index: 2; left: 159px; top: 76px;" src="img/gras4.png">
  59. <img style="position: absolute; z-index: 2; left: 159px; top: 114px;" src="img/gras4.png">
  60. <img style="position: absolute; z-index: 2; left: 159px; top: 152px;" src="img/gras4.png">
  61. <img style="position: absolute; z-index: 2; left: 212px; top: 0px;" src="img/gras4.png">
  62. <img style="position: absolute; z-index: 2; left: 212px; top: 38px;" src="img/gras4.png">
  63. <img style="position: absolute; z-index: 2; left: 212px; top: 76px;" src="img/gras4.png">
  64. <img style="position: absolute; z-index: 2; left: 212px; top: 114px;" src="img/gras4.png">
  65. <img style="position: absolute; z-index: 2; left: 212px; top: 152px;" src="img/gras4.png">
  66. </div>
  67.  
  68. </div>
  69. </body>
  70. </html>


stworzenie mapy składającej się z tysięcy takich prostokątów zajmie dużo czasu i plik będzie strasznie wielki
Go to the top of the page
+Quote Post
ixpack
post
Post #2





Grupa: Zarejestrowani
Postów: 248
Pomógł: 55
Dołączył: 1.06.2010
Skąd: mam to wiedzieć?

Ostrzeżenie: (0%)
-----


Ok. Nie znam się. Ale dzięki pewnej dyskusji natrafiłem na blog #luq'a O Ten, w którym pisze o swoich przemyśleniach etc. na temat mapy... Może się przyda.

Ps. nie klikaj "pomógł" - bo to nie moje ;0
Go to the top of the page
+Quote Post
ghastblood
post
Post #3





Grupa: Zarejestrowani
Postów: 360
Pomógł: 12
Dołączył: 17.09.2009
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


nie wiem czy to jest akurat to bo konstrukcyjnie przypomina to mapę do gry rpg w 2d gdzie wielkość mapy jest ograniczona w tym przypadku muszę tworzyć obiekty na osi współrzędnych x,y

może jakieś inne sugestie ?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 20:35