HTML <area> shape ຄວາມຈະກິດ
ອະທິບາຍ ແລະ ການນໍາໃຊ້
shape
ຄວາມຈະກິດກັບບັນດາພາກສ່ວນຂອງບັນດາພາກສ່ວນ.
shape
ຄວາມຈະກິດກັບ coords ຄວາມຈະກິດ ນຳໃຊ້ຮ່ວມກັນເພື່ອກຳນົດຂະໜາດ, ຮູບບົກ ແລະ ຕອນຕັ້ງຂອງເຂດ.
ຄວາມຈະກິດ
ນຳໃຊ້ຄວາມຈະກິດ shape ເພື່ອກຳນົດຮູບບົກຂອງແຕ່ລະພາກສ່ວນໃນພາບມີມາດຕະການຕິດຕາມມືຂອງອາສີດ:
<map name="planetmap"> <area shape="rect" coords="0,0,114,576" href="sun.html" alt="Sun"> <area shape="circle" coords="190,230,5" href="mercur.html" alt="Mercury"> <area shape="circle" coords="228,230,5" href="venus.html" alt="Venus"> </map>
ຂອບເຂດ
<area shape="default|rect|circle|poly">
ຄູ່ມູນຄວາມຈະກິດ
ຄູ່ມູນ | ອະທິບາຍ |
---|---|
default | ກໍານົດເຂດທັງໝົດ. |
rect | ອະທິບາຍເຂດຮູບບົກບົກ. |
circle | ອະທິບາຍເຂດຮູບບົກວົງ. |
poly | ອະທິບາຍເຂດຮູບບົກຫຼາຍປະຕູ. |
ອະທິບາຍຢ່າງລະອຽດ:
shape
ຄວາມຈະກິດຂອງບັນດາພາກສ່ວນໃນພາບມີມາດຕະການຕິດຕາມມືຂອງອາສີດ:
- ຮູບບົກວົງ (circ ຫຼື circle)
- ຮູບບົກຫຼາຍປະຕູ (poly ຫຼື polygon)
- ຮູບບົກ (rect ຫຼື rectangle)
shape
ຄູ່ມູນຂອງຄວາມລະບຸບຈະມີຜົນກະທົບຕໍ່ການອະທິບາຍຄວາມຈະກິດຈະການຂອງ coords. ຖ້າບໍ່ໃຊ້ shape
attribute, then it will assume the use of the value default. According to the standard, default means that the area covers the entire image. In practice, browsers use default rectangular areas and expect to find 4 coords values. If no shape is specified and no 4 coordinates are included in the tag, the browser will ignore the entire area.
can recognize shape
Browser for the default value of the attribute, can provide an area including all hotspots, to be used when clicking outside the range of other hotspot definitions. Since the area in the <map> tag is in the order of "first come, first served", all default areas must be placed at the end. Otherwise, the default area will cover all areas that appear in other image maps.
Browser has no strict requirements for the implementation of shape names. For example, for rectangles, Netscape 4 cannot recognize "rectangle", but can recognize "rect". For this reason, we recommend using abbreviated names.
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |