얼렁뚱땅코드/그누보드

이미지맵 area 사용시 배경색 넣기

얼렁뚱땅 디자이너 2020. 11. 30. 15:31
<script type="text/javascript" src="<?php echo G5_JS_URL ?>/jquery.maphilight.min.js"></script>
<script>
	$(document).ready(function(e) {
		$.fn.maphilight.defaults = {
			fill: true,  //이미지맵 링크에 마우스가 올라오면 색을 넣을 건지 여부
			fillColor: 'ff9600',  // 색상지정
			fillOpacity: 1,  // 투명도 지정 0~1
			stroke: true,    // border를 넣을건지 여부 false로 설정하면 이하 옵션 무시됨
			strokeColor: 'ffffff',  //border 색상
			strokeOpacity: 1,  //border 투명도
			strokeWidth: 1  //border 폭
		}
		$('img[usemap]').maphilight();
	});
</script>