【发布时间】:2013-03-23 10:28:27
【问题描述】:
我有一个用于 twitter bootstrap 的切换,其中一个单词弹出并且没有留在切换中,我在下面的红色框中突出显示了混乱的单词:
我的代码是:
<div class=\"span9 space\">
<h3 class=\"title pull-left\">$name</h3>
<link rel=\"stylesheet\" href=\"lib/prism/prism-light.css\">
<script src=\"lib/prism/prism.js\"></script>
<link rel=\"stylesheet\" href=\"toggle-switch.css\">
<form class=\"form-horizontal pull-right\">
<div class=\"control-group\">
<label class=\"control-label\"></label>
<div class=\"controls btn disabled switch switch-two\">
<input id=\"week9\" name=\"view\" type=\"radio\" checked>
<label for=\"week9\" onclick=\"\">Not Visited</label>
<input id=\"month10\" name=\"view\" type=\"radio\">
<label for=\"month10\" onclick=\"\">Visited</label>
<span class=\"slide-button btn btn-warning\"></span>
</div>
</div>
</form>
</div>
我使用的切换开关来自这里:
http://ghinda.net/css-toggle-switch/bootstrap.html
这也是我的实时代码:
【问题讨论】:
-
是不是因为 CSS 有一个宽度,不能在那个狭小的空间里容纳所有“未访问”,所以它正在向下移动?
-
你的 html 中真的有所有这些反斜杠吗?
-
我正在使用 php 输出,需要转义它们@didierc
-
@Mike 从理论上讲,如果它们在任何
<?php?>标记之外,您不必转义双引号。另外,如果它们在里面,您可以使用单引号并为您节省额外的击键;-)
标签: php css twitter-bootstrap slidetoggle