2013-08-16 91 views
0

我面临单选按钮对齐问题。查看图片以了解问题。如果我从本地文件系统加载css,就会发生这种情况。但是,当我打开相同的页面使用指向一个URL的CSS它正常工作。jquery移动单选按钮对齐

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

我使用jQuery viersion是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/

enter image description here

+0

你能为此创建一个小提琴吗? –

+0

@DKM:但是当我从本地加载css时,问题就在发生。无论如何,我会在创建小提琴后更新它 – karthick

+0

@DKM:创建小提琴。 – karthick

回答

0

更换图像本地文件与捆绑的jQuery 1.3.2图像。

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

在css文件中的图像文件和位置定义之间存在冲突。

当您使用指向url的css时,会加载正确的图像。

将其复制并验证。