ชวนดู code slide หน่อยครับ ผมแกหมดแล้วครับ แต่ทำให้พื้นหลังมันเป็นภาพที่ต้องการไม่ได้ครับ
พื้นหลังมันออกเป็นสีขาวอะครับ จะใส่รูปเข้าไปอะครับ ชวนดูให้หน่อยว่าต้องเปลี่ยนตรงใหนครับ
Code (PHP)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SlidesJS Standard Code Example</title>
<meta name="description" content="SlidesJS is a simple slideshow plugin for jQuery. Packed with a useful set of features to help novice and advanced developers alike create elegant and user-friendly slideshows.">
<meta name="author" content="Nathan Searles">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<body>
<!-- SlidesJS Required (if responsive): Sets the page width to the device width. -->
<meta name="viewport" content="width=device-width">
<!-- End SlidesJS Required -->
<!-- CSS for slidesjs.com example -->
<link rel="stylesheet" href="css/example.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- End CSS for slidesjs.com example -->
<!-- SlidesJS Optional: If you'd like to use this design -->
<style>
body {
-webkit-font-smoothing: antialiased;
font: normal 15px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #000000;
padding-top:0px;
}
#slides {
display: none
}
#slides .slidesjs-navigation {
margin-top:10px;
}
a.slidesjs-next,
a.slidesjs-previous,
a.slidesjs-play,
a.slidesjs-stop {
background-repeat: no-repeat;
display:block;
width:0px;
height:0px;
overflow: hidden;
text-indent: -9999px;
float: left;
margin-right:5px;
}
a.slidesjs-next {
margin-right:10px;
background-position: -12px 0;
}
a:hover.slidesjs-next {
background-position: -12px -18px;
}
a.slidesjs-previous {
background-position: 0 0;
}
a:hover.slidesjs-previous {
background-position: 0 -18px;
}
a.slidesjs-play {
width:15px;
background-position: -25px 0;
}
a:hover.slidesjs-play {
background-position: -25px -18px;
}
a.slidesjs-stop {
width:18px;
background-position: -41px 0;
}
a:hover.slidesjs-stop {
background-position: -41px -18px;
}
.slidesjs-pagination {
margin: 7px 0 0;
float: right;
list-style: none;
}
.slidesjs-pagination li {
float: left;
margin: 0 1px;
}
.slidesjs-pagination li a {
display: block;
width: 13px;
height: 0;
padding-top: 13px;
background-image: url(img/pagination.png);
background-position: 0 0;
float: left;
overflow: hidden;
}
.slidesjs-pagination li a.active,
.slidesjs-pagination li a:hover.active {
background-position: 0 -13px
}
.slidesjs-pagination li a:hover {
background-position: 0 -26px
}
#slides a:link,
#slides a:visited {
color: #333
}
#slides a:hover,
#slides a:active {
color: #9e2020
}
.navbar {
overflow: hidden
}
</style>
<!-- End SlidesJS Optional-->
<!-- SlidesJS Required: These styles are required if you'd like a responsive slideshow -->
<style>
#slides {
display: 1000
}
.container {
margin: 1000
}
/* For tablets & smart phones */
@media (max-width: 767px) {
body {
padding-left: 0px;
padding-right: 0px;
}
.container {
width: auto
}
}
/* For smartphones */
@media (max-width: 480px) {
.container {
width: 950px
}
}
/* For smaller displays like laptops */
@media (min-width: 768px) and (max-width: 979px) {
.container {
width: 950px
}
}
/* For larger displays */
@media (min-width: 1200px) {
.container {
width: 950px
}
}
</style>
<!-- SlidesJS Required: -->
</head>
<body>
<!-- SlidesJS Required: Start Slides -->
<!-- The container is used to define the width of the slideshow -->
<div class="container">
<div id="slides">
<img src="img/ad.png"/>
<img src="img/ad.png"/>
<img src="img/ad.png"/>
<img src="img/ad.png"/>
</div>
</div>
<!-- End SlidesJS Required: Start Slides -->
<!-- SlidesJS Required: Link to jQuery -->
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<!-- End SlidesJS Required -->
<!-- SlidesJS Required: Link to jquery.slides.js -->
<script src="js/jquery.slides.min.js"></script>
<!-- End SlidesJS Required -->
<!-- SlidesJS Required: Initialize SlidesJS with a jQuery doc ready -->
<script>
$(function() {
$('#slides').slidesjs({
width: 950,
height: 390,
play: {
active: true,
auto: true,
interval: 4000,
swap: true
}
});
});
</script>
<!-- End SlidesJS Required -->
</body>
</html>
Tag : PHP
Date :
2013-06-22 17:27:10
By :
tangsupap
View :
1228
Reply :
4
ได้ละครับผม ขอบคุณครับ ไปลบ ออก อิอิ
Code (PHP)
<link rel="stylesheet" href="css/example.css">
ประวัติการแก้ไข 2013-06-24 10:07:32
Date :
2013-06-24 09:45:17
By :
tangsupap
พอดีอยากจะให้ slide ที่จะเลื่อน แต่ละ slide หยุดสักพักก่อนที่จะไป slide ถัดไป ช่วยดู code ทีครับ แกตรงใหนก็ยังไม่หยุดสักทีครับ
Date :
2013-06-24 10:16:46
By :
tangsupap
Code (PHP)
<!-- SlidesJS Required: Initialize SlidesJS with a jQuery doc ready -->
<script>
$(function() {
$('#slides').slidesjs({
width: 940,
height: 528,
navigation: false,
play: {
active: true,
// [boolean] Generate the play and stop buttons.
// You cannot use your own buttons. Sorry.
effect: "slide",
// [string] Can be either "slide" or "fade".
interval: 5000, // ปรับตรงบรรทัดนี้ครับ จะให้ค้างนานแค่ไหนก็ลองปรับตัวเลขดู
// [number] Time spent on each slide in milliseconds.
auto: true,
// [boolean] Start playing the slideshow on load.
swap: true,
// [boolean] show/hide stop and play buttons
pauseOnHover: false,
// [boolean] pause a playing slideshow on hover
restartDelay: 2500
// [number] restart delay on inactive slideshow
}
});
});
</script>
<!-- End SlidesJS Required -->
Date :
2013-06-24 10:53:54
By :
pokultra
Load balance : Server 02