jquery mobile.I의 버튼에 사용자 정의 아이콘을 사용해야합니다. 나와 함께 아이콘이 있으며 버튼에 들어갑니다. 그러나 내가 직면 한 문제는 기본 서클이 내 아이콘 주위에 표시됩니다.이 경계선을 제거하고 그대로 아이콘을 표시해야합니다.이 문제를 해결하는 방법은 무엇입니까?jquery mobile의 버튼에 사용자 정의 직사각형 아이콘 사용
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
</head>
<body>
<div data-role="page" id="home">
<div data-role="header" data-theme="b">
<h1>Test</h1>
</div>
<div data-role="content" data-theme="b">
<input type="button" data-inline="true" data-theme="b" data-icon="save-icon" data-iconpos="left" value="Save Data"></a>
</div>
<div data-role="footer" data-position="fixed" data-id="pFooter">
<h1>Test</h1>
</div>
</div>
</body>
</html>
다음과 같은 CSS :
이
은 내가 가진 HTML입니다.ui-icon-save-icon{
background: url(save_icon.png) 50% 50% no-repeat; background-size: 19px 21px;
}
당신은 여기에서 볼 수 있습니다 - http://jsfiddle.net/yPRpt/
, 아이콘이 없음을 유의하시기 바랍니다 있지만, 이 예제에서 원을 볼 수 있습니다.
대단히 감사합니다. 핵심 요소는 "투명"합니다. 14x14 크기의 이미지가 추가되어 "background-size : 14px 14px"가 추가되었습니다. 스크롤을 제거하고 "0 0"을 "2px 2px"로 변경했습니다. – DemitryT