如何在手机上显示全宽图像

问题描述

伙计们,我在这里遇到了问题,我正在用freee模板建立一个网站,但是我碰到一个问题,尽管我做了很少的接触,却遇到了一个问题,我的滑块图像没有出现像台式机一样在移动设备上全宽,您能帮我吗? 非常感谢,这里是代码

body {
  background: #fff;
  font-family: "Open Sans",Arial,sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  color: #868e96;
}

.img-fluid{
  width:  255px;
  height: 255px;
  object-fit: cover;
}

a {
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

h1,h2,h3,h4,h5 {
  color: #000;
}

.btn,.form-control {
  outline: none;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

/* Header */
header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
}

header .navbar-brand {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 400;
}

header .navbar-brand span {
  color: #007bff;
}

header .top-bar {
  background: #007bff;
}

header .top-bar a {
  color: #fff;
  padding: 10px;
  font-size: 13px;
  display: inline-block;
}

header .top-bar .cta-btn {
  display: inline-block;
  padding-right: 15px;
  padding-left: 15px;
  background: #5AC8D8;
}

header .top-bar .cta-btn:hover {
  -webkit-box-shadow: 2px 0 20px 0 rgba(0,0.1);
  box-shadow: 2px 0 20px 0 rgba(0,0.1);
}

header .top-bar .social {
  margin-bottom: 0;
}

header .top-bar .social li {
  display: inline-block;
  text-align: center;
}

header .top-bar .social li a {
  color: #fff;
  padding: 10px;
  width: 40px;
  display: inline-block;
}

@media (max-width: 991px) {
  header .top-bar .social li a {
    padding-left: 10px;
    padding-right: 10px;
    width: inherit;
  }
}

header .top-bar .social li a:hover {
  background: #5AC8D8;
  color: #fff;
  -webkit-box-shadow: 2px 0 20px 0 rgba(0,0.1);
}

header .navbar {
  padding-top: 0;
  padding-bottom: 0;
  background: white !important;
}

@media (max-width: 1199px) {
  header .navbar {
    background: white !important;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
}

header .navbar .nav-link {
  padding: 1.7rem 1rem;
  outline: none !important;
}

@media (max-width: 1199px) {
  header .navbar .nav-link {
    padding: .5rem 0rem;
  }
}

header .navbar .nav-link.active {
  color: #007bff !important;
}

header .navbar .dropdown-menu {
  font-size: 14px;
  border-radius: 4px;
  border: none;
  -webkit-box-shadow: 0 2px 20px -5px rgba(0,0.1);
  box-shadow: 0 2px 20px -5px rgba(0,0.1);
}

header .navbar .dropdown-menu .dropdown-item.active {
  background: #f8f9fa;
  color: #007bff !important;
}

header .navbar .dropdown-menu a {
  padding-top: 7px;
  padding-bottom: 7px;
}

/* Owl Carousel */
.owl-carousel .owl-item {
  opacity: .4;
}

.owl-carousel .owl-item.active {
  opacity: 1;
}

.owl-carousel .owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
}

.owl-carousel .owl-nav .owl-prev,.owl-carousel .owl-nav .owl-next {
  position: absolute;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  margin-top: -10px;
}

.owl-carousel .owl-nav .owl-prev span:before,.owl-carousel .owl-nav .owl-next span:before {
  font-size: 40px;
}

.owl-carousel .owl-nav .owl-prev {
  left: 30px !important;
}

.owl-carousel .owl-nav .owl-next {
  right: 30px !important;
}

.owl-carousel .owl-dots {
  text-align: center;
}

.owl-carousel .owl-dots .owl-dot {
  width: 10px;
  height: 10px;
  margin: 5px;
  border-radius: 50%;
  background: #e6e6e6;
}

.owl-carousel .owl-dots .owl-dot.active {
  background: #007bff;
}

.owl-carousel.home-slider {
  z-index: 1;
  position: relative;
}

.owl-carousel.home-slider .owl-nav {
  opacity: 0;
  visibility: hidden;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
}

.owl-carousel.home-slider .owl-nav button {
  color: #fff;
}

.owl-carousel.home-slider:focus .owl-nav,.owl-carousel.home-slider:hover .owl-nav {
  opacity: 1;
  visibility: visible;
}

.owl-carousel.home-slider .slider-item {
  background-size:cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.owl-carousel.home-slider .slider-item .slider-text {
  color: #fff;
  height: calc(100vh - 117px);
  min-height: 700px;
}

.owl-carousel.home-slider .slider-item .slider-text h1 {
  font-size: 72px;
  color: #fff;
  line-height: 1.2;
  font-weight: 300;
}

@media (max-width: 991px) {
  .owl-carousel.home-slider .slider-item .slider-text h1 {
    font-size: 40px;
  }
}

.owl-carousel.home-slider .slider-item .slider-text p {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 300;
  color: rgba(255,255,0.8);
}

.owl-carousel.home-slider.inner-page .slider-item {
  height: calc(50vh - 117px);
  min-height: 500px;
}

.owl-carousel.home-slider.inner-page .slider-item .slider-text {
  color: #fff;
  height: calc(50vh - 117px);
  min-height: 500px;
}

.owl-carousel.home-slider .owl-dots {
  position: absolute;
  bottom: 150px;
  width: 100%;
}

.owl-carousel.home-slider .owl-dots .owl-dot {
  width: 18px;
  height: 18px;
  margin: 5px;
  border-radius: 50%;
  background: #e6e6e6;
  background: none;
  border: 2px solid rgba(255,0.5);
  outline: none !important;
  position: relative;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
}

.owl-carousel.home-slider .owl-dots .owl-dot span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,0.5);
  border-radius: 50% !important;
  left: 50%;
  top: 50%;
  display: block;
  -webkit-transform: translate(-50%,-50%);
  -ms-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);
}

.owl-carousel.home-slider .owl-dots .owl-dot.active {
  border: 2px solid white;
}

.owl-carousel.home-slider .owl-dots .owl-dot.active span {
  background: white;
}

.owl-carousel.major-caousel .owl-stage-outer {
  padding-top: 30px;
  padding-bottom: 30px;
}

.owl-carousel.major-caousel .owl-nav .owl-prev,.owl-carousel.major-caousel .owl-nav .owl-next {
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
  color: #495057;
}

.owl-carousel.major-caousel .owl-nav .owl-prev:hover,.owl-carousel.major-caousel .owl-nav .owl-prev:focus,.owl-carousel.major-caousel .owl-nav .owl-next:hover,.owl-carousel.major-caousel .owl-nav .owl-next:focus {
  color: #868e96;
  outline: none;
}

.owl-carousel.major-caousel .owl-nav .owl-prev.disabled,.owl-carousel.major-caousel .owl-nav .owl-next.disabled {
  color: #dee2e6;
}

.owl-carousel.major-caousel .owl-nav .owl-prev {
  left: -60px !important;
}

.owl-carousel.major-caousel .owl-nav .owl-next {
  right: -60px !important;
}

.owl-carousel.major-caousel .owl-dots {
  bottom: -30px !important;
  position: relative;
}

.owl-custom-nav {
  float: right;
  position: relative;
  z-index: 10;
}

.owl-custom-nav .owl-custom-prev,.owl-custom-nav .owl-custom-next {
  padding: 10px;
  font-size: 30px;
  background: #ccc;
  line-height: 0;
  width: 60px;
  text-align: center;
  display: inline-block;
}

.home-feature {
  margin-top: -120px;
  position: relative;
  z-index: 2;
}

.home-feature .one-col,.home-feature .two-col,.home-feature .three-col {
  position: relative;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
  z-index: 2;
  top: 0;
  border-bottom: 10px solid #5AC8D8;
}

@media (max-width: 767px) {
  .home-feature .one-col,.home-feature .three-col {
    border: none;
    margin-bottom: 10px;
  }
}

.home-feature .one-col .col-inner,.home-feature .two-col .col-inner,.home-feature .three-col .col-inner {
  position: relative;
}

.home-feature .one-col .icon,.home-feature .two-col .icon,.home-feature .three-col .icon {
  font-size: 200px;
  color: rgba(255,0.07);
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%,-50%);
  z-index: -1;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
}

.home-feature .one-col h2,.home-feature .two-col h2,.home-feature .three-col h2 {
  color: #fff;
  font-size: 16px;
  letter-spacing: .05em;
  font-weight: 300;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.home-feature .one-col p,.home-feature .two-col p,.home-feature .three-col p {
  color: rgba(255,0.7);
  font-weight: 300;
}

.home-feature .one-col p:last-child,.home-feature .two-col p:last-child,.home-feature .three-col p:last-child {
  margin-bottom: 0;
}

.home-feature .one-col .btn-more,.home-feature .two-col .btn-more,.home-feature .three-col .btn-more {
  -webkit-transition: .15s all ease-out;
  -o-transition: .15s all ease-out;
  transition: .15s all ease-out;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  display: block;
  text-align: center;
  bottom: -50px;
  left: 0;
  right: 0;
  padding: 20px;
  background: #5AC8D8;
  z-index: -1;
  color: #fff;
  -webkit-box-shadow: 0 4px 20px -5px rgba(0,0.4);
  box-shadow: 0 4px 20px -5px rgba(0,0.4);
}

@media (max-width: 767px) {
  .home-feature .one-col .btn-more,.home-feature .three-col .btn-more {
    opacity: 1;
    visibility: visible;
    position: relative;
    bottom: 0;
  }
}

.home-feature .one-col .btn-more:hover,.home-feature .two-col .btn-more:hover,.home-feature .three-col .btn-more:hover {
  background: #6fcfdd;
}

.home-feature .one-col:hover,.home-feature .two-col:hover,.home-feature .three-col:hover {
  top: -10px;
  z-index: 3;
  -webkit-box-shadow: 0 4px 40px -5px rgba(0,0.4);
  box-shadow: 0 4px 40px -5px rgba(0,0.4);
}

@media (max-width: 767px) {
  .home-feature .one-col:hover,.home-feature .three-col:hover {
    top: 0;
  }
}

.home-feature .one-col:hover .icon,.home-feature .two-col:hover .icon,.home-feature .three-col:hover .icon {
  -webkit-transform: translate(-10px,-50%);
  -ms-transform: translate(-10px,-50%);
  transform: translate(-10px,-50%);
}

.home-feature .one-col:hover .btn-more,.home-feature .two-col:hover .btn-more,.home-feature .three-col:hover .btn-more {
  opacity: 1;
  visibility: visible;
  bottom: -50px;
}

@media (max-width: 767px) {
  .home-feature .one-col:hover .btn-more,.home-feature .three-col:hover .btn-more {
    bottom: 0;
  }
}

.home-feature .one-col {
  background: #007bff;
}

.home-feature .two-col {
  background: #006fe6;
}

.home-feature .three-col {
  background: #0067d6;
}

.section {
  padding: 7em 0;
}

.cta-link {
  background: #007bff;
  padding: 3.5em 0 3em 0;
  display: block;
  text-align: center;
}

.cta-link:focus,.cta-link:active {
  outline: none;
}

.cta-link span {
  line-height: 1.2;
}

.cta-link .sub-heading {
  color: #fff;
  display: block;
  font-size: 20px;
}

.cta-link .heading {
  font-size: 50px;
  color: #001933;
}

@media (max-width: 991px) {
  .cta-link .heading {
    font-size: 30px;
  }
}

.cta-link:hover {
  background: #006fe6;
}

.cover_1 {
  background-size: cover;
  background-position: center center;
  padding: 7em 0;
}

.cover_1 .sub-heading {
  color: rgba(255,0.7);
  font-size: 22px;
}

.cover_1 .heading {
  font-size: 50px;
  color: white;
  font-weight: 300;
}

.heading {
  color: #000;
}

.heading.border-bottom {
  position: relative;
  padding-bottom: 30px;
}

.heading.border-bottom:before {
  bottom: 0;
  position: absolute;
  content: "";
  width: 50px;
  height: 2px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
  background: #007bff;
}

.text-black {
  color: #000 !important;
}

.stretch-section .video {
  display: block;
  position: relative;
  -webkit-box-shadow: 4px 4px 70px -20px rgba(0,0.5);
  box-shadow: 4px 4px 70px -20px rgba(0,0.5);
}

.media-feature .icon {
  font-size: 60px;
  color: #007bff;
}

.media-feature h3 {
  font-size: 20px;
}

.media-custom {
  background: #fff;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
  -webkit-box-shadow: 0 2px 3px 0 rgba(0,0.1);
  box-shadow: 0 2px 3px 0 rgba(0,0.1);
  margin-bottom: 30px;
}

.media-custom .meta-post {
  color: #adb5bd;
  font-size: 13px;
  text-transform: uppercase;
}

.media-custom .meta-chat {
  color: #ced4da;
}

.media-custom .meta-chat:hover {
  color: #868e96;
}

.media-custom:focus,.media-custom:hover {
  -webkit-box-shadow: 0 2px 10px 0 rgba(0,0.2);
  box-shadow: 0 2px 10px 0 rgba(0,0.2);
}

.media-custom .media-body {
  padding: 30px;
}

.media-custom .media-body h3 {
  font-size: 20px;
}

.media-custom .media-body p:last-child {
  margin-bottom: 0;
}

.list-unstyled.check li {
  position: relative;
  padding-left: 30px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.list-unstyled.check li:before {
  color: #5AC8D8;
  left: 0;
  font-family: "Ionicons";
  content: "\f122";
  position: absolute;
}

.custom-tabs .border-right {
  border-right: 1px solid #dee2e6;
}

@media (max-width: 767px) {
  .custom-tabs .border-right {
    border-right: none;
  }
}

.custom-tabs .nav-pills .nav-link {
  padding-left: 0;
  font-size: 26px;
  font-weight: 100;
  color: #adb5bd;
  line-height: 1.2;
  margin-bottom: 10px;
}

.custom-tabs .nav-pills .nav-link span {
  font-size: 18px;
}

.custom-tabs .nav-pills .nav-link.active {
  background: none;
  color: #007bff;
  padding-left: 20px;
  position: relative;
}

.custom-tabs .nav-pills .nav-link.active:before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: #5AC8D8;
}

.custom-tabs .tab-pane .icon {
  font-size: 60px;
  display: block;
  color: #007bff;
}

.custom-tabs .tab-pane h2 {
  font-size: 60px;
  font-weight: 300;
}

#modalAppointment .modal-content {
  border-radius: 0;
  border: none;
}

#modalAppointment .modal-body,#modalAppointment .modal-footer {
  padding: 40px;
}

.site-footer {
  padding: 7em 0;
  background: #f2f2f2;
  background: #283E56;
  color: rgba(255,0.7);
}

.site-footer a {
  color: rgba(255,0.5);
}

.site-footer a:hover {
  color: white;
}

.site-footer h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid rgba(255,0.1);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.site-footer .footer-link li {
  line-height: 1.3;
  margin-bottom: 15px;
}

.site-footer hr {
  width: 100%;
}

.site-footer .border-t {
  border-top: 1px solid rgba(255,0.1);
}

.copyright {
  font-size: 14px;
}

.element-animate {
  opacity: 0;
  visibility: hidden;
}

html代码:

<section class="home-slider inner-page owl-carousel">
    <div class="slider-item" style="background-image: url({{ asset('img/slider-2.jpg') }});">
        <div class="container">
            <div class="row slider-text align-items-center">
                <div class="col-md-7 col-sm-12 element-animate">
                    <h1>{% trans %}Welcome to Denticlin{% endtrans %}</h1>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- END section -->
<section class="section stretch-section">
    <div class="container">
        <div class="row justify-content-center mb-5 element-animate">
            <div class="col-md-8 text-center mb-5">
                <h2 class="text-uppercase heading border-bottom mb-4">{% trans %}sdfsdfn{% endtrans %}</h2>
                <p class="mb-0 lead">{% trans %}dsfsfs{% endtrans %}</p><br>
                <p class="mb-0 lead">{% trans %}Wsdfs.{% endtrans %}</p><br>
                <p class="mb-0 lead">{% trans %}sdfsdfn.{% endtrans %}</p><br>

            </div>
        </div>
    </div>
</section>

解决方法

如果可能的话,请提供您的HTML代码,没有它,没人能真正告诉发生了什么事情。

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...