السلام عليكم ورحمة الله وبركاته
في درسنا اليوم سوف نتعرف على طريقة تركيب السلايد شو بتقنية CSS3 ، لعرض مواضيع المدونة ، وهذه الإضافة متجاوبة وفيها لمس احترافية جمالية ، نبدأ على بركة الله بشرح طريقة التركيب .
::: طريقة التركيب :::
1- ادخل إلى مدونتك ، ثم اختر لوحة التحكم .
2- من لوحة التحكم اخت تخطيط .
3- من تخطيط اختر اضافة أداة:
4- اضف الكود التالي في صتدوق الأداة ثم احفظ .
<style>
.main_slider {
float: left;
position: relative;
}
.window_slider {
height:286px;
width: 900px;
overflow: hidden;
position: relative;
}
.image_reel {
position: absolute;
top: 0; left: 0;
}
.image_reel img {float: left;}
.paging {
position: absolute;
bottom: 40px; right: -7px;
width: 178px; height:47px;
z-index: 100;
text-align: center;
line-height: 40px;
background: url(http://cdn.top4top.co/p_125ijo1.png) no-repeat;
display: none;
}
.paging a {
padding: 5px;
text-decoration: none;
color: #fff;
}
.paging a.active {
font-weight: bold;
background: #920000;
border: 1px solid #610000;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
}
.paging a:hover {font-weight: bold;}
</style>
<script type="text/javascript" src="https://googledrive.com/host/0BxFbqjck0GDdZmhvb0RLYTU1NWM"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".paging").show();
$(".paging a:first").addClass("active");
var imageWidth = $(".window_slider").width();
var imageSum = $(".image_reel img").size();
var imageReelWidth = imageWidth * imageSum;
$(".image_reel").css({'width' : imageReelWidth});
rotate = function(){
var triggerID = $active.attr("rel") - 1;
var image_reelPosition = triggerID * imageWidth;
$(".paging a").removeClass('active');
$active.addClass('active');
$(".image_reel").animate({
left: -image_reelPosition
}, 500 );
};
rotateSwitch = function(){
play = setInterval(function(){
$active = $('.paging a.active').next();
if ( $active.length === 0) {
$active = $('.paging a:first');
}
rotate();
}, 7000);
};
rotateSwitch();
$(".image_reel a").hover(function() {
clearInterval(play);
}, function() {
rotateSwitch();
});
$(".paging a").click(function() {
$active = $(this);
clearInterval(play);
rotate();
rotateSwitch();
return false;
});
});
</script>
<div class="main_slider">
<div class="window_slider">
<div class="image_reel">
<a href="ضع هنا رابط التوجيه"><img src="ضع هنا رابط الصورة" width="900" alt="Faceblog Evolutions"/></a>
<a href="ضع هنا رابط التوجيه"><img src="ضع هنا رابط الصورة" width="900" alt="Faceblog Evolutions"/></a>
<a href="ضع هنا رابط التوجيه"><img src="ضع هنا رابط الصورة" width="900" alt="Faceblog Evolutions"/></a>
<a href="ضع هنا رابط التوجيه"><img src="ضع هنا رابط الصورة" width="900" alt="Faceblog Evolutions"/></a>
</div>
</div>
<div style="display: block;" class="paging">
<a href="ضع هنا رابط التوجيه" rel="1">1</a>
<a href="ضع هنا رابط التوجيه" rel="2">2</a>
<a href="ضع هنا رابط التوجيه" rel="3">3</a>
<a href="ضع هنا رابط التوجيه" rel="4">4</a>
</div>
</div>
5- عدّل ما هو داخل الكود .



0 Comments:
إرسال تعليق