简体   繁体   English

如何使它在所有浏览器和不同屏幕尺寸上看起来都一样?

[英]How to make it look same on all the browser and on different screen size?

I am using owl carousel for sliding the container in my website.我正在使用 owl carousel 在我的网站中滑动容器。 The slider works correctly, the issue arises only after minimizing the screen or if i check that on different monitor or on different browser. slider 工作正常,只有在最小化屏幕或我在不同的显示器或不同的浏览器上检查后才会出现问题。

Basically, the below code which is not same for all the web applications and screen sizes.基本上,以下代码对于所有 web 应用程序和屏幕尺寸都不相同。

The container size varies with all the browsers and different monitor sizes.容器大小因所有浏览器和不同的监视器大小而异。 Can someone guide me here?有人可以在这里指导我吗?

<div class="container" style= "background-color: #DCDCDC;"> 
    <div class="country-name">Countries</div>
    <div class= "owl-carousel own-theme" style="padding-bottom: 15px;">
        <div class="column-about">
            <div class="country-list">Opportunities?</div>
            <div id="MyDIV">
                The range of courses offered at the universities is vast and gives you the opportunity to choose the area<a href="listofcountries.html#anchor-name" class="more_btn__block">More<i class="fa fa-angle-right"></i></a>
            </div>
        </div>
        <div class="column-about">
            <div class="country-list">Opportunities?</div>
            <div id="MyDIV">
                rsities in the world with a modern approach to education and a welcoming<a href="listofcountries.html#netherland-name" class="more_btn__block">More<i class="fa fa-angle-right"></i></a>
            </div>
        </div>
        <div class="column-about">
            <div class="country-list">Opportunities ?</div>
            <div id="MyDIV">
                Theopular destinations to study higher education, with more than 500,000 students e education degrees and the qualifications are recognised by employers<a href="listofcountries.html#uk-name" class="more_btn__block">More<i class="fa fa-angle-right"></i></a>
            </div>
        </div>
        <div class="column-about">
            <div class="country-list">Opportunitie?</div>
            <div id="MyDIV">
                higher education system is one of the best in Europe with a good career opportunities. Students attending a<a href="listofcountries.html#france-name" class="more_btn__block">More<i class="fa fa-angle-right"></i></a>
            </div>
        </div>
        <div class="column-about">
            <div class="country-list">Opportunities ?</div>
            <div id="MyDIV">
                Universitee Programs in the world. University i<a href="listofcountries.html#sweden-name" class="more_btn__block">More<i class="fa fa-angle-right"></i></a>
            </div>
        </div>
    </div>  
</div>

<script type="text/javascript">
$('.owl-carousel').owlCarousel({
    loop: true,
    margin: 10,
    dotsContainer: true,
    nav: true,
    autoplay: true,
    autoplayTimeout: 2000,  
    autoplayHoverPause: true,           
    responsive: {
        0: {
            items: 1
        },
        300: {
            items: 1
        },
        600: {
            items: 3
        },
        1000: {
            items: 5
        },
        1600: {
            items: 5
        }
    }
});

function myFunction() {
    document.getElementById("myDIV").style.MozTextAlignLast = "right"; 
    document.getElementById("myDIV").style.textAlignLast = "right";
}
</script>

Have you defined你定义了吗

<meta name="viewport" content="width=device-width, initial-scale=1.0">

in your head part?在你的头部?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM