我想在我从initializr获得的一个非常简单的响应式页面模板中运行Rhino滑块,所以稍微修改了一个锅炉板。
Rhino Slider幻灯片遍布整个地方(或者它只是我的CSS,到处都是。)
问题是虽然我很难和#34;保持"滑块及其控件,在正确的位置和正确的大小。 我喜欢左侧菜单占用更少的空间,因此幻灯片显示可以在800x450px中显示,但首先,我只是想让它简单地工作,所以我可以开始玩它。
我希望有人能指出我正确的方向......
我的rhinoslider-1.05.css代码:
.rhino-btn {
background:url(../img/rhinoslider-sprite.png) 0 0 no-repeat;
z-index:10;
width:56px;
height:53px;
display:block;
text-indent:-999%;
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
.rhino-prev, .rhino-next { bottom:-4px; }
.rhino-prev {
left:-6px;
background-position:-168px 0;
}
.rhino-next {
right:-6px;
background-position:-106px 0;
}
.rhino-prev:hover { background-position:-168px -53px; }
.rhino-next:hover { background-position:-106px -53px; }
.rhino-toggle {
top:-4px;
left:-6px;
}
.rhino-play { background-position:0 0; }
.rhino-play:hover { background-position:0 -53px; }
.rhino-pause { background-position:-56px 0; }
.rhino-pause:hover { background-position:-56px -53px; }
.rhino-container { position:inherit; }
.rhino-caption {
position:absolute;
background: #000;
display:none;
left:0;
right:0;
top:0;
color:#fff;
padding:10px;
text-align:right;
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
.rhino-bullets {
position: absolute;
bottom: -3px;
left: 50%;
margin:0 0 0 -50px;
z-index: 10;
background: #fff;
padding:0;
}
.rhino-bullets:before, .rhino-bullets:after {
position:absolute;
display:block;
left:-16px;
content:' ';
width:16px;
height:26px;
background:url(../img/rhinoslider-sprite.png) -224px 0 no-repeat;
}
.rhino-bullets:after {
left:auto;
right:-16px;
background-position: -240px 0;
}
.rhino-bullets li {
float:left;
display:inline;
margin:0 2px;
}
.rhino-bullets li a.rhino-bullet {
display: block;
width: 16px;
height: 15px;
cursor: pointer;
background: white;
font-size: 10px;
text-align: center;
padding: 6px 0 5px 0;
color: #333;
text-decoration:none;
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
.rhino-bullets li a.rhino-bullet:hover, .rhino-bullets li a.rhino-bullet:focus {
color:#999;
background:#eee;
}
.rhino-bullets li a.rhino-bullet.rhino-active-bullet {
color:#fff;
background:#5cd4e8;
}
我的主要CSS文档,main.css:
html {
/*color: #222;*/
font-size: 1em;
line-height: 1.4;
}
::-moz-selection { /* Code for Firefox */
background: #f9f2d5;
text-shadow: none;
}
::selection {
background: #f9f2d5;
text-shadow: none;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
fieldset {
border: 0;
margin: 0;
padding: 0;
}
textarea {
resize: vertical;
}
.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ===== Initializr Styles ==================================================
Author: Jonathan Verrecchia - verekia.com/initializr/responsive-template
========================================================================== */
body {
font: 14px/24px Arial, sans-serif;
color:#a09b7e;
background: #d3d1c5;
}
.wrapper {
width: 90%;
margin: 0 5%;
}
/* ===================
ALL: Classic Khaki Theme
=================== */
.header-container {
border-top: 20px solid #a09b7e;
background: #d3d1c5;
}
.footer-container,
{
background: #a09b7e;
color: #d3d1c5;
border-top: 20px solid #a09b7e;
}
.main aside {
background: #d3d1c5;
font: 16px/24px Arial, sans-serif;
color:#a09b7e;
}
.title {
color: #a09b7e;
}
/* ==============
MOBILE: Menu
============== */
/*
nav ul {
margin: 0;
padding: 0;
list-style-type: none;
}
nav a {
display: block;
margin-bottom: 10px;
padding: 15px 0;
text-align: center;
text-decoration: none;
font-weight: bold;
color: white;
background: #e44d26;
}
nav a:hover,
nav a:visited {
color: white;
}
nav a:hover {
text-decoration: underline;
}
*/
/* ==============
MOBILE: Main
============== */
.main {
padding: 30px 0;
}
.main article h1 {
font-size: 2em;
}
.main slideshow h1 {
}
.main aside {
color: #d3d1c5;
padding: 0px 0% 0px;
}
.footer-container footer {
color: #d3d1c5;
padding: 10px 0;
}
/* ===============
ALL: IE Fixes
=============== */
.ie7 .title {
padding-top: 20px;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
#frontSlides {
width: 95%;
height: auto;
}
#slider li {
list-style:none;
}
#slider{
width:95%;
height:auto;
/*IE bugfix*/
padding:0;
margin:0;
}
/* ==========================================================================
Media Queries
========================================================================== */
@media only screen and (min-width: 480px) {
/* ====================
INTERMEDIATE: Menu
==================== */
/*
nav a {
float: left;
width: 27%;
margin: 0 1.7%;
padding: 25px 2%;
margin-bottom: 0;
}
nav li:first-child a {
margin-left: 0;
}
nav li:last-child a {
margin-right: 0;
}
*/
/* ========================
INTERMEDIATE: IE Fixes
======================== */
/*
nav ul li {
display: inline;
}
*/
.oldie nav a {
margin: 0 0.7%;
}
}
@media only screen and (min-width: 768px) {
/* ====================
WIDE: CSS3 Effects
==================== */
.header-container {
-webkit-box-shadow: 0px 5px 15px #aaa;
-moz-box-shadow: 0px 5px 15px #aaa;
box-shadow: 0px 5px 15px #aaa;
}
/*
.main aside {
-webkit-box-shadow: 0 2px 5px #aaa;
-moz-box-shadow: 0 2px 5px #aaa;
box-shadow: 0 2px 5px #aaa;
}
*/
/* ============
WIDE: Menu
============ */
.title {
float: left;
}
nav {
float: left;
width: 38%;
}
/* ============
WIDE: Main
============ */
.main article {
float: right;
width: 57%;
}
.main slideshow {
float: right;
width: 57%;
}
.main aside {
float: left;
width: 28%;
}
}
@media only screen and (min-width: 1140px) {
/* ===============
Maximal Width
=============== */
.wrapper {
width: 1026px; /* 1140px - 10% for margins */
margin: 0 auto;
}
}
/* ==========================================================================
Helper classes
========================================================================== */
.hidden {
display: none !important;
visibility: hidden;
}
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
.invisible {
visibility: hidden;
}
.clearfix:before,
.clearfix:after {
: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
/* ==========================================================================
Print styles
========================================================================== */
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important;
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
: " (" attr(href) ")";
}
abbr[title]:after {
: " (" attr(title) ")";
}
a[href^="#"]:after,
a[href^="javascript:"]:after {
: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
/* ==========================================================================
Vertical Menu styles - The Accordion Side Menu
========================================================================== */
.demoHeaders {
margin-top: 12em;
}
#dialog-link {
padding: .4em 1em .4em 20px;
text-decoration: none;
position: relative;
}
#dialog-link span.ui-icon {
margin: 0 5px 0 0;
position: absolute;
left: .2em;
top: 50%;
margin-top: -8px;
}
#icons {
margin: 0;
padding: 0;
}
#icons li {
margin: 2px;
position: relative;
padding: 4px 0;
cursor: pointer;
float: left;
list-style: none;
}
#icons span.ui-icon {
float: left;
margin: 0 4px;
}
.fakewindowcontain .ui-widget-overlay {
position: absolute;
}
select {
width: 200px;
}
最后是页面本身,index.html:
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
<script type='text/javascript' src='js/jquery-1.7.2.min.js'></script> <!-- Main Java library script-->
<!-- The following 3 scripts are utilized by the Accordion Menu in the aside side bar -->
<script type='text/javascript' src='js/jquery.cookie.js'></script> <!-- Acco. Menu script-->
<script type='text/javascript' src='js/jquery.hoverIntent.minified.js'></script><!-- Acco. Menu script-->
<script type='text/javascript' src='js/jquery.dcjqaccordion.2.7.min.js'></script> <!-- Acco. Menu script-->
<!--The following 3 scripts are utilized by the Rhino slider -->
<script type="text/javascript" src="js/rhinoslider-1.05.min.js"></script>
<script type="text/javascript" src="js/mousewheel.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Top Interieur | Velkommen</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.min.css"> <!-- used to normalize-->
<link rel="stylesheet" href="css/main.css"> <!-- Main CSS styling-->
<link rel="stylesheet" href="css/dcaccordion.css"> <!-- Accordion CSS styling or look below-->
<script type="text/javascript">
$(document).ready(function($){
$('#accordion-1').dcAccordion({
eventType: 'hover',
autoClose: true,
hoverDelay: 300,
saveState: true,
disableLink: true,
speed: 'medium',
showCount: false,
autoExpand: false,
cookie : 'dcjq-accordion-1',
classExpand : 'dcjq-current-parent'
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#frontSlides').rhinoslider({
autoPlay: true,
pauseOnHover: false,
showBullets: 'hover',
showControls:'hover',
showCaptions: 'hover'
});
});
</script>
<link href="css/skins/classickhaki.css" rel="stylesheet" type="text/css" /> <!-- Accordion Menu CSS styling-->
<link type="text/css" rel="stylesheet" href="css/rhinoslider-1.05.css" /> <!-- Rhino Slider CSS styling-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script>window.html5 || document.write('<script src="js/vendor/html5shiv.js"><\/script>')</script>
<!--<![endif]-->
</head>
<body>
<!-- ********** HEADER with Top Bar *********** -->
<div class="header-container">
<header class="wrapper clearfix">
<a href="index.html">
<img src="images/TopLogoChopin.jpg" alt="Top Interieur" style="width:379px;height:100px;margin-left:auto;margin-right:auto;"></a>
</header>
</div>
<!-- ********* ********* ********* ******** *********** -->
<!-- ********** MAIN FRONTPAGE CONTENT with Side menu *********** -->
<!-- ********* ********* ********* ******** *********** -->
<div class="main-container">
<div class="main wrapper clearfix">
<aside> <!-- ********** Accordion Side menu *********** -->
<div class="classickhaki demo-container">
<ul id="accordion-1" class="accordion">
<li><a href="#">Om Os</a></li>
<li><a href="#">Hoteller</a>
<ul>
<li><a href="#">Moderne</a></li>
<li><a href="#">Klassisk</a></li>
</ul>
</li>
<li><a href="#">Virksomheder</a></li>
<li><a href="#">Private Hjem</a></li>
<li><a href="#">Belysning</a></li>
<li><a href="#">Referencer</a></li>
<li><a href="#">Kontakt</a></li>
</ul>
</div>
</aside> <!-- ********** Accordion Side menu end*********** -->
<slideshow> <!-- ********** SLIDESHOW or ARTICLE column start ********** -->
<div id="frontSlides">
<ul id="slider">
<li><img src="img/slider/01.jpg" alt="" /></li>
<li><img src="img/slider/02.jpg" alt="" /></li>
<li><img src="img/slider/03.jpg" alt="" /></li>
<li><img src="img/slider/04.jpg" alt="" /></li>
</ul>
</div>
</slideshow>
<!-- -->
</div> <!-- #main -->
</div> <!-- #main-container -->
<div class="footer-container">
<footer class="wrapper">
<h3>footer</h3>
</footer>
</div>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>