0

我在单选按钮的对齐方面遇到问题。请参阅图像以了解问题。如果我从本地文件系统加载 css,就会发生这种情况。但是,当我使用指向 url 的 css 打开同一页面时,它可以正常工作。

我使用的 CSS 是 http://view.jquerymobile.com/1.3.2/dist/demos/css/themes/default/jquery.mobile.min.css

我使用的 jquery 版本是 1.9.1,jqm 版本是 1.3.2。源代码是

<!DOCTYPE html>
<html class="ui-mobile">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<base href=".">
<meta charset="UTF-8">
<meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1,maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="./css/jquery.mobile.min.css">

<script type="text/javascript"
    src="./js/jquery-1.9.1.min.js"></script>
<script type="text/javascript"
    src="./js/jquery.mobile-1.3.2.min.js"></script>
<title>Mobile</title>

</head>
<body class="ui-mobile-viewport" >
<div data-role="header" data-theme="a" data-position="fixed">

</div>
<div data-role="content">   

    <fieldset data-role="controlgroup" data-iconpos="right" id="choiceChooser">
        <input type="radio" name="radio-choice-w-6" id="radio-choice-w-6a" value="Choice 1" >
        <label for="radio-choice-w-6a">Choice 1</label>
        <input type="radio" name="radio-choice-w-6" id="radio-choice-w-6b" value="Choice 2">
        <label for="radio-choice-w-6b">Choice 2</label>
        <input type="radio" name="radio-choice-w-6" id="radio-choice-w-6c" value="Choice 3">
        <label for="radio-choice-w-6c">Choice 3</label>
        <input type="radio" name="radio-choice-w-6" id="radio-choice-w-6d" value="Choice 4">
        <label for="radio-choice-w-6d">Choice 4</label>
        <input type="radio" name="radio-choice-w-6" id="radio-choice-w-6e" value="Choice 5">
        <label for="radio-choice-w-6e">Choice 5</label>
    </fieldset>
</div>

</body>
</html>

同样的小提琴是

http://jsfiddle.net/karthick6891/yFdgD/

在此处输入图像描述

4

1 回答 1

0

Replace the images file in local with the images which is bundled with jquery 1.3.2.

http://jquerymobile.com/resources/download/jquery.mobile-1.3.2.zip

There is a conflict between the image files and position define in css file.

When you are using a css pointing to an url, the correct images are loaded.

Copy it and validate.

于 2013-12-12T06:00:05.133 回答