php - 不留在 css 中的单词切换

标签 php css twitter-bootstrap slidetoggle

我有一个用于 Twitter Bootstrap 的开关,其中一个词弹出并且没有停留在开关内,我在下面的红色框中突出显示了困惑的词:

enter image description here

我的代码是:

<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

这也是我的实时代码:

http://www.beerportfolio.com/breweryPage2.php?id=BSsTGw

最佳答案

问题是 Switch 类不适合你的话,

您可以通过在样式表中的开关类中硬编码宽度或将其添加到您想要拉伸(stretch)的 div 中来解决它,这应该可以解决您的问题

<div class=\"controls btn disabled switch switch-two\" style=\"width: xxxpx !important;\">

而xxx代表你需要的值

关于php - 不留在 css 中的单词切换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15582587/

相关文章:

php - Laravel Eloquent 比较日期时间字段中的日期

php - 更新 SQL 列

php - 自动转换 CSS 文件以用于深色背景

html - 切换的容器应该向上移动其他容器

javascript - Bootstrap 选项卡导航在 vue.js 中不起作用

php - iPhone Objective C 图片上传到apache服务器

php - HybridAuth Facebook 返回了无效的用户 ID

jquery - 计算切换前后jquery的内容区域

html - 为单个页面覆盖 Bootstrap 样式

javascript - Bootstrap 3 事件选项卡在页面加载时不显示