- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我这里有一些代码,当压缩到移动版本中时,它呈现不正确:
html 在这里(带有 sidenavbar)有谁知道如何使盒子在移动版本中正确呈现
亲切的问候,
.pdsa-summary-block-primary {
background-color:#428bca;
color:#fff;
}
.pdsa-summary-block-primary .summary-footer {
background-color:deepskyblue;
}
.pdsa-summary-block-primary .summary-footer a {
color:white;
}
.pdsa-summary-block-success {
background-color:#3c763d;
color:#fff;
}
.pdsa-summary-block-success .summary-footer {
background-color:green;
}
.pdsa-summary-block-success .summary-footer a {
color:white;
}
.pdsa-summary-block-info {
background-color:#31708f;
color:#fff;
}
.pdsa-summary-block-info .summary-footer {
background-color:teal;
}
.pdsa-summary-block-info .summary-footer a {
color:white;
}
.pdsa-summary-block-danger {
background-color:#a94442;
color:#fff;
}
.pdsa-summary-block-danger .summary-footer {
background-color:red;
}
.pdsa-summary-block-danger .summary-footer a {
color:white;
}
/*Structure of Summary blocks*/
.pdsa-summary-block {
position: relative;
width:100%;
margin:0.3em;
padding:1em;
min-height:15em;
}
.pdsa-summary-block .summary-background i, .pdsa-summary-block .summary-background div {
margin-left:-0.4em;
margin-top:0.1em;
font-size:8em;
opacity:0.3;
}
.pdsa-summary-block .summary-body {
position:absolute;
top:1.3em;
right:0.8em;
}
.pdsa-summary-block .summary-body .summary-line-1 {
text-align:right;
font-size:xx-large;
}
.pdsa-summary-block .summary-body .summary-line-2 {
text-align:right;
font-size:medium;
}
.pdsa-summary-block .summary-footer {
position:absolute;
bottom: 0em;
right: 0em;
width:100%;
padding:0.4em;
font-weight: 300;
text-transform: uppercase;
font-size:small;
opacity:0.6;
}
.pdsa-summary-block .summary-footer a {
text-decoration:none;
}
.pdsa-summary-block .summary-footer:hover {
opacity:1;
cursor:pointer;
}
.pdsa-sn-wrapper {
position:absolute;
top:3.6em;
left:0em;
width:13em;
height:100%;
background-color:#FF9900;
/*orange.*/
transition:left 0.3s linear;
-moz-transition:left 0.3s linear;
-webkit-transition:left 0.3s linear;
}
.pdsa-sn-wrapper ul {
list-style:none;
width:11em;
margin-top:2em;
margin-left:1em;
padding:0em;
}
.pdsa-sn-wrapper ul li {
margin-top: 1em;
margin-bottom:0.5em;
}
/* Make hover background .pdsa-sn-wrapper ul li:hover {
background-color:#760909;
} */
.pdsa-sn-wrapper ul li a {
color: white;
text-decoration:none;
padding:0.5em;
}
.pdsa-sn-wrapper ul li a:hover {
text-decoration:none;
color:white;
}
.pdsa-sn-wrapper ul li a:active, .pdsa-sn-wrapper ul li a:focus {
text-decoration:none;
outline:none;
color:white;
}
.pdsa-sn-wrapper ul .pdsa-sn-brand {
margin-left:-0.5em;
font-size: large;
color:white;
}
.pdsa-sn-wrapper ul .pdsa-sn-brand a {
color:white;
}
.pdsa-sn-wrapper ul .pdsa-sn-brand a:hover {
color:white;
background:none;
}
.pdsa-sn-wrapper ul li a span {
margin-top:-1em;
margin-bottom:-1em;
margin-left:1em;
margin-top: -1em;
padding-top:-1em;
padding-bottom:-1em;
}
.pdsa-sn-wrapper ul li ul {
list-style:none;
margin-top: 1em;
margin-left: 1em;
}
/*Make left nav turn into icon only on mobile*/
@media all and (max-width:768px) {
.pdsa-sn-wrapper {
left:-10em;
/*changed above to +13em. now it will take up part of screen.*/
}
.pdsa-sn-wrapper ul li:hover {
background-color:#FF9900;
}
.pdsa-sn-wrapper ul li a i {
padding-left:10em;
margin-top:-1em;
margin-bottom:-1em;
}
.body-content {
margin-left:3em;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<body class="notransition">
<div class="container">
<div class="row">
<header> <a class="linkStyle" href="Default.html">My Tunes</a>
</header>
</div>
<nav id="sideNavParent" class="pdsa-sn-wrapper">
<ul>
<li class="pdsa-sn-brand"><a href="Default.html" class="visible-sm visible-md visible-lg">Music</a>
</li>
<li> <a href="default.html">
<span class="visible-sm visible-md visible-lg">Home</span>
<i class="glyphicon glyphicon-home visible-xs"></i>
</a>
</li>
<li> <a href="#" data-toggle="collapse" data-target="#ulGenres">
<span class="visible-sm visible-md visible-lg">Genres <b class="caret"></b></span>
<i class="glyphicon glyphicon-globe visible-xs"></i>
</a>
<div class="visible-sm visible-md visible-lg">
<ul id="ulGenres" class="collapse" data-parent="#sideNavParent">
<li> <a href="Genres.html">All Genres</a>
</li>
<li> <a href="#">Jazz</a>
</li>
<li> <a href="#">Country</a>
</li>
<li> <a href="#">Rock</a>
</li>
</ul>
</div>
</li>
<li> <a href="#" data-toggle="collapse" data-target="#ulPlaylists">
<span class="visible-sm visible-md visible-lg">Playlists <b class="caret"></b></span>
<i class="glyphicon glyphicon-list-alt visible-xs"></i>
</a>
<div class="visible-sm visible-md visible-lg">
<ul id="ulPlaylists" class="collapse" data-parent="#sideNavParent">
<li> <a href="#">All Playlists</a>
</li>
<li> <a href="#">My Top Rated</a>
</li>
<li> <a href="#">Top Country</a>
</li>
<li> <a href="#">Top Classic Rock</a>
</li>
</ul>
</div>
</li>
<li> <a href="#">
<span class="visible-sm visible-md visible-lg">Songs</span>
<i class="glyphicon glyphicon-music visible-xs"></i>
</a>
</li>
<li> <a href="#">
<span class="visible-sm visible-md visible-lg">Downloads</span>
<i class="glyphicon glyphicon-download visible-xs"></i>
</a>
</li>
</ul>
</nav>
</div>
<div class="container body-content">
<div class="row">
<div class="col-xs-12 col-sm-4">
<div class="pdsa-summary-block pdsa-summary-block-primary">
<div class="summary-background"> <i class="glyphicon glyphicon-globe"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">14</div>
<div class="summary-line-2">Genres</div>
</div>
<div class="summary-footer"> <a href="#">View Genres</a>
<i class="glyphicon glyphicon-chevron-right" style="float:right;"></i>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="pdsa-summary-block pdsa-summary-block-success">
<div class="summary-background"> <i class="glyphicon glyphicon-list-alt"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">5</div>
<div class="summary-line-2">Playlists</div>
</div>
<div class="summary-footer"> <a href="#">See playlists...</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-4">
<div class="pdsa-summary-block pdsa-summary-block-info">
<div class="summary-background"> <i class="glyphicon glyphicon-music"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">2143</div>
<div class="summary-line-2">Songs</div>
</div>
<div class="summary-footer"> <a href="#">All Songs.</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="pdsa-summary-block pdsa-summary-block-danger">
<div class="summary-background"> <i class="glyphicon glyphicon-download"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">1</div>
<div class="summary-line-2">Downloads</div>
</div>
<div class="summary-footer"> <a href="#">Get Downloads.</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-8">
<div class="pdsa-readme-box pdsa-readme-box-primary">
<div class="readme-header"> <i class="glyphicon glyphicon-music"></i>
</div>
<div class="readme-body">
<h1>Free Music</h1>
<p>Each day we have a free song selected especially for you!</p>
</div>
<div class="readme-footer"> <a href="#">+ See my song</a>
</div>
</div>
</div>
</div>
</div>
</body>
最佳答案
这可能会帮助您调整代码或作为基础,以便您更好地控制两者。
body,
html {
height: 100%;
}
body {
padding-top: 65px;
}
.navbar.navbar-default {
background: #fff;
border-bottom: none;
border-bottom: 6px solid #FF9900;
}
.sidebar-fixed {
margin-top: 50px;
padding: 5px 18px;
position: fixed;
width: 175px;
height: 100%;
top: 0;
left: 0;
background: #FF9900;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
}
ul.sidebar-list {
list-style: none;
display: inline;
text-align: left;
}
.sidebar-fixed #ulGenres,
.sidebar-fixed #ulPlaylists {
list-style: none;
text-align: left;
margin-left: -20px;
}
.sidebar-fixed #ulGenres > li,
.sidebar-fixed #ulPlaylists > li {
padding-top: 10px;
font-size: 13px;
}
.sidebar-fixed #ulGenres > li >a,
.sidebar-fixed #ulPlaylists > li > a {
color: #fff;
text-decoration: none;
}
ul.sidebar-list > li {
font-size: 18px;
padding-bottom: 25px;
}
ul.sidebar-list > li > a {
color: #fff;
text-decoration: none;
}
.navbar-default .collapse .navbar-nav > li > a,
.navbar-default .navbar-header a.navbar-brand {
color: #3e474f;
}
.main-content {
margin-left: 175px;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.nav-icons {
padding-top: 12px;
margin-right: 25px;
float: right;
position: absolute;
right: 0;
}
.nav-icons span {
padding-left: 10px;
padding-right: 10px;
font-size: 20px
}
.nav-icons a {
color: #FF9900;
}
@media (max-width: 767px) {
.sidebar-fixed {
width: 85px;
}
.main-content {
margin-left: 80px;
padding: 0;
}
ul.sidebar-list {
text-align: center;
}
ul.sidebar-list > li {
font-size: 12px;
padding-bottom: 25px;
}
.sidebar-fixed #ulGenres,
.sidebar-fixed #ulPlaylists {
margin-left: -40px;
text-align: center;
}
.sidebar-fixed li .nav-text,
.sidebar-fixed li span.caret {
display: none;
}
}
/*Content*/
.pdsa-summary-block-primary {
background-color: #428bca;
color: #fff;
}
.pdsa-summary-block-primary .summary-footer {
background-color: deepskyblue;
}
.pdsa-summary-block-primary .summary-footer a {
color: white;
}
.pdsa-summary-block-success {
background-color: #3c763d;
color: #fff;
}
.pdsa-summary-block-success .summary-footer {
background-color: green;
}
.pdsa-summary-block-success .summary-footer a {
color: white;
}
.pdsa-summary-block-info {
background-color: #31708f;
color: #fff;
}
.pdsa-summary-block-info .summary-footer {
background-color: teal;
}
.pdsa-summary-block-info .summary-footer a {
color: white;
}
.pdsa-summary-block-danger {
background-color: #a94442;
color: #fff;
}
.pdsa-summary-block-danger .summary-footer {
background-color: red;
}
.pdsa-summary-block-danger .summary-footer a {
color: white;
}
/*Structure of Summary blocks*/
.pdsa-summary-block {
position: relative;
width: 100%;
margin: 0.3em;
padding: 1em;
min-height: 15em;
}
.pdsa-summary-block .summary-background i,
.pdsa-summary-block .summary-background div {
margin-left: -0.4em;
margin-top: 0.1em;
font-size: 8em;
opacity: 0.3;
}
.pdsa-summary-block .summary-body {
position: absolute;
top: 1.3em;
right: 0.8em;
}
.pdsa-summary-block .summary-body .summary-line-1 {
text-align: right;
font-size: xx-large;
}
.pdsa-summary-block .summary-body .summary-line-2 {
text-align: right;
font-size: medium;
}
.pdsa-summary-block .summary-footer {
position: absolute;
bottom: 0em;
right: 0em;
width: 100%;
padding: 0.4em;
font-weight: 300;
text-transform: uppercase;
font-size: small;
opacity: 0.6;
}
.pdsa-summary-block .summary-footer a {
text-decoration: none;
}
.pdsa-summary-block .summary-footer:hover {
opacity: 1;
cursor: pointer;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header"> <a class="navbar-brand" href="#">My Tunes</a>
<div class="nav-icons">
<a href="#"> <span class="glyphicon glyphicon-user"></span>
</a>
<a href="#"> <span class="glyphicon glyphicon-lock"></span>
</a>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="sidebar-fixed" id="sideNavParent">
<ul class="sidebar-list">
<li>
<a href="#"> <span class="nav-text"> Music</span> <span class="glyphicon glyphicon-headphones"></span>
</a>
</li>
<li>
<a href="#"> <span class="nav-text"> Home</span> <span class="glyphicon glyphicon-home"></span>
</a>
</li>
<li>
<a href="#nope" data-toggle="collapse" data-target="#ulGenres"> <span class="nav-text"> Genres </span> <span class="glyphicon glyphicon-globe"></span> <span class="caret"></span>
</a>
<ul id="ulGenres" class="collapse" data-parent="#sideNavParent">
<li> <a href="#">All Genres</a>
</li>
<li> <a href="#">Jazz</a>
</li>
<li> <a href="#">Country</a>
</li>
<li> <a href="#">Rock</a>
</li>
</ul>
</li>
<li>
<a href="#nope" data-toggle="collapse" data-target="#ulPlaylists"> <span class="nav-text"> Playlists </span> <span class="glyphicon glyphicon-list-alt"></span> <span class="caret"></span>
</a>
<ul id="ulPlaylists" class="collapse" data-parent="#sideNavParent">
<li> <a href="#">All Playlists</a>
</li>
<li> <a href="#">My Top Rated</a>
</li>
<li> <a href="#">Top Country</a>
</li>
<li> <a href="#">Top Classic Rock</a>
</li>
</ul>
</li>
<li>
<a href="#"> <span class="nav-text"> Songs </span> <span class="glyphicon glyphicon-music"></span>
</a>
</li>
<li>
<a href="#"> <span class="nav-text"> Downloads </span> <span class="glyphicon glyphicon-download"></span>
</a>
</li>
</ul>
</div>
<div class="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<div class="pdsa-summary-block pdsa-summary-block-primary">
<div class="summary-background"> <i class="glyphicon glyphicon-globe"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">14</div>
<div class="summary-line-2">Genres</div>
</div>
<div class="summary-footer"> <a href="#">View Genres</a>
<i class="glyphicon glyphicon-chevron-right" style="float:right;"></i>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="pdsa-summary-block pdsa-summary-block-success">
<div class="summary-background"> <i class="glyphicon glyphicon-list-alt"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">5</div>
<div class="summary-line-2">Playlists</div>
</div>
<div class="summary-footer"> <a href="#">See playlists...</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="pdsa-summary-block pdsa-summary-block-info">
<div class="summary-background"> <i class="glyphicon glyphicon-music"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">2143</div>
<div class="summary-line-2">Songs</div>
</div>
<div class="summary-footer"> <a href="#">All Songs.</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="pdsa-summary-block pdsa-summary-block-danger">
<div class="summary-background"> <i class="glyphicon glyphicon-download"></i>
</div>
<div class="summary-body">
<div class="summary-line-1">1</div>
<div class="summary-line-2">Downloads</div>
</div>
<div class="summary-footer"> <a href="#">Get Downloads.</a>
<i class="glyphicon glyphicon-chevron-right pull-right"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="pdsa-readme-box pdsa-readme-box-primary">
<br>
<div class="readme-header"> <i class="glyphicon glyphicon-music"></i>
</div>
<div class="readme-body">
<h1>Free Music</h1>
<p>Each day we have a free song selected especially for you!</p>
</div>
<div class="readme-footer"> <a href="#">+ See my song</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
关于javascript - Bootstrap 3 移动版不行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32511149/
我是使用 undertow 的新手,我正在开发一个独立的应用程序,它将用作嵌入式服务器。我希望我可以在我的嵌入式 undertow 中部署 web sockets、servlets 和 restful
有谁知道为什么这不起作用,今天有 2 个答案的组合。我只是想让传递的参数显示在警报中,其他一切都有效,所以忽略 url 操作等 $('#changetopicss').click(function (
我需要在用户在 input 中输入数据后更新 div,但我不能。 div 出现,但随后消失。 我的代码: 函数.js window.onload = function(){ var mydata =
我有一个包含一堆 java 项目的工作区。如果我转到文件->刷新,它不会真正刷新任何内容(可能是当前选择的项目)。如何让 Eclipse 刷新所有项目? 最佳答案 它确实只会刷新当前项目(或者更具体地
我在 makefile 中使用了 += 并尝试添加更多编译文件: 使左边的文件能正常工作:编译4个.cpp文件。 但是make the right file是不行的,只能编译main.o和xmluti
下面的代码应该打印 3 个人,但实际上打印了 4 个人,为什么?Person("a", 1) 和 Person("a", 4) 应该被视为相同,但它们不是。 import java.util.Tree
$ testem ci not ok 1 PhantomJS - Browser "phantomjs /home/ubuntu/.nvm/v0.10.12/lib/node_modules/test
我有一个 JavaScript 函数,它没有给出我想要的结果。 这是代码(它是 JavaScript 函数的一部分): alert("yes"); // This
我在一些ajax内容之后将一些数字放入输入字段中,当我尝试让该字段将其作为脚本数据粘贴到uploadify中时,它会粘贴空字符串,但是如果我在输入字段中输入相同的值并尝试将 uploadify 中的字
我有这个表 文章 文章ID 文章名称 文章数量 文章_价格 文章数量 订单 orders_id 文章_id 发票 ID 客户 ID 客户 customers_id 客户名称 客户位置 客户办公室 客户
我正在尝试一种 SQL 注入(inject): http://localhost/test/mysql.php?uid=1;%20DROP%20TABLE%20test 此 URL 应等于语句: SE
假设你有这样一个类 public class Foo { public int Bar { get; set; } = 42; } 如果您尝试将属性作为 ref 参数传递,编译器会发出错误 CS
我已经实现了 block UI,因为当 ajax 请求开始时,此请求可能需要一点时间,一切都会按预期工作。 但是当 ajax 请求完成并显示消息框时,UI 不会解除阻止! 有什么想法吗? 我使用的是
首先,对这个非描述性的标题感到抱歉,我太匆忙了,所以无法想出更好的标题。 第二: 我的数据库的一部分如下图所示: 我的系统上有贡献者,每个贡献者都写入多个源,并且一个源可以有许多正在工作的贡献者。用户
这个问题在这里已经有了答案: Why can't you use the keyword 'this' in a static method in .Net? (7 个答案) 关闭 9 年前。 这来
var allRows = this.getTbodyEl().rows; for (var i = allRows.length - 1; i >= 0; i--){ var thisRowID
我正在尝试连接到 MAMP Pro 上托管的 MYSQL 服务器。我正在尝试使用 java 和 VBA 从同一台客户端计算机进行连接。 VBA 连接正常,但 java 在几秒钟后给出错误 com.my
我有一个将 SVG 下载为 PNG 的功能。它在 Chrome 中运行良好,但在 Firefox 中不会触发下载。需要改变什么? function downloadGraph(contextDivId
我刚刚开始使用 Gulp,但我似乎无法让它工作。当我运行常规 sass 命令时,一切都编译得很好。 这是我的 Gulp 文件: //Gulp Dependencies var gulp = requi
Ajax GET 请求工作正常。但我必须使用 POST,因为我希望发送大量数据,对于 GET 来说太多了。 环境:Apache 2、Debian 9(从头开始)、jQuery 3.2.1,没什么特别的
我是一名优秀的程序员,十分优秀!