Hi @kadir koçaslan,
hi guys i have these codes but these codes are not mobile compatible help please
What does incompatible mobile device mean? Code not working? You only provided the html code. Should you be using @media on mobile? https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries I noticed that you use the swiper library, I wrote a demo you can refer to.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.5/js/swiper.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.5/css/swiper.css" />
<!-- Demo styles -->
<style type="text/css">
html, body
{
position: relative;
height: 100%;
}
body
{
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color: #000;
margin: 0;
padding: 0;
}
.swiper-container
{
width: 100%;
height: 200px;
}
.swiper-slide
{
text-align: center;
font-size: 18px;
background: #fff; /* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<section class="kaydirma">
<div class="swiper-container">
<div class="swiper-wrapper content">
<div class="swiper-slide card">
<div class="card-content">
<div class="image">
<img src="wave.PNG" alt="" />
</div>
<div class="name-profession">
<span class="name">CLİO</span>
</div>
<div class="button">
<button class="aboutMe">KATOLOG İÇİN TIKLAYINIZ</button>
<button class="hireMe">FİYAT TEKLİFİ ALINIZ</button>
</div>
</div>
</div>
<div class="swiper-slide card">
<div class="card-content">
<div class="image">
<img src="wave.PNG" alt=""/>
</div>
<div class="name-profession">
<span class="name">MEGANE</span>
</div>
<div class="button">
<button class="aboutMe">KATOLOG İÇİN TIKLAYINIZ</button>
<button class="hireMe">FİYAT TEKLİFİ ALINIZ</button>
</div>
</div>
</div>
<div class="swiper-slide card">
<div class="card-content">
<div class="image">
<img src="wave.PNG" alt=""/>
</div>
<div class="name-profession">
<span class="name">CAPTUR</span>
</div>
<div class="button">
<button class="aboutMe">KATOLOG İÇİN TIKLAYINIZ</button>
<button class="hireMe">FİYAT TEKLİFİ ALINIZ</button>
</div>
</div>
</div>
<div class="swiper-slide card">
<div class="card-content">
<div class="image">
<img src="wave.PNG" alt="" />
</div>
<div class="name-profession">
<span class="name">MEGANE</span>
</div>
<div class="button">
<button class="aboutMe">KATOLOG İÇİN TIKLAYINIZ</button>
<button class="hireMe">FİYAT TEKLİFİ ALINIZ</button>
</div>
</div>
</div>
</div>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-pagination"></div>
</section>
<script type="text/javascript">
var swiper = new Swiper('.swiper-container', {
spaceBetween: 30,
centeredSlides: true,
autoplay: false,
pagination: {
el: '.swiper-pagination',
clickable: true
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
}
});
$(".swiper-container").mouseenter(function () {
swiper.autoplay.start();
});
$(".swiper-container").mouseleave(function () {
swiper.autoplay.stop();
swiper.slideTo(0); // 0 is the index number of slide.
});
</script>
</form>
</body>
</html>
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.