質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
CSS3

CSS(Cascading Style Sheet)の第3版です。CSS3と略されることが多いです。色やデザインを柔軟に変更することが可能になります。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

Q&A

解決済

1回答

1458閲覧

ヘッダー部分に余白ができており、余白を埋めたいのとjsのエラー原因を追究したいです。

free_teku

総合スコア103

CSS3

CSS(Cascading Style Sheet)の第3版です。CSS3と略されることが多いです。色やデザインを柔軟に変更することが可能になります。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

0グッド

0クリップ

投稿2021/06/16 12:27

編集2021/06/17 03:09

前提・実現したいこと

ヘッダー部分に上下左右に余白があるので、余白を埋めてすっきりさせたいです。

ここに質問の内容を詳しく書いてください。
ヘッダー部分に余白ができており、余白を埋めたいです。
なぜ起きているのか分からず質問しました。

発生している問題・エラーメッセージ

.script.jsに以下のエラーが表示されています。
・識別子またはキーワードを数値リテラルのすぐ後に指定することはできません。
・宣言またはステートメントが必要です。
↑解決しました。

原因は【if($win.width()>768px){】のようです(768を消すとエラーも消えます)

ヘッダー部分に余白あり

完成図

エラーメッセージ

該当のソースコード

HTML

1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <link rel="stylesheet" href="css/destyle.css"> 5 <link rel="stylesheet" href="css/style.css"> 6 <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css"/> 7</head> 8<body> 9 <!--ヘッダー--> 10 <header class="header"> 11 <div class="header-inner"> 12 13 <div id="logo"> 14 <p> Cresta Design</p> 15 </div> 16 <div class="header-wrapper"> 17 <nav class="nav"> 18 <ul class="header-list"> 19 20 <li class="list-item"><a href="#">Concept</a></li> 21 <li class="list-item"><a href="#">Service</a></li> 22 <li class="list-item"><a href="#"> Works</a></li> 23 <li class="list-item"><a href="./concept">Contact</a></li> 24 </ul> 25 </nav> 26 </div> 27 28 <button class="burger-btn"> 29 <span class="bar-bar_top"></span> 30 <span class="bar-bar_mid"></span> 31 <span class="bar-bar_bottom"></span> 32 </button> 33 34 35 <div class="image-inner"> 36 <div class="fv"> 37 <ul class="slider"> 38 <li><img src="./image/fv-bgi_01@2x.jpg" alt=""></li> 39 <li><img src="./image/fv-bgi_02@2x.jpg" alt=""></li> 40 <li><img src="./image/fv-bgi_03@2x.jpg" alt=""></li> 41 </ul> 42 </div> 43 <div class="image-message"> 44 <p>Design for Smile. <br class="sp-br">快適なオフィスを デザインする</p> 45 </div> 46 </div> 47 </div> 48 49 </header> 50 51 52 <!----> 53 54<!--メイン--> 55 <main class="main"> 56 <!--コンセプト--> 57 <section class="concept"> 58 <h2 class="sub-title ">CONCEPT</h2> 59 <div class="section-inner"> 60 <p class="message"> 61 “働きたくなる空間”をデザインすることで <br class="pc-br"> 62 人々を幸せにする。" 63 </p> 64 <div class="explain"> 65 <p class="text">私たちは、オフィスに特化した空間デザイン専門としております。その理由は、「働きたくなる空間で仕事ができれば多くの人を 66 幸せにできるのではないか」と考えるためです。そんな想いの株式会社Cresta Designだからこそできる空間デザインを提供させて 67 いただきます。 68 </p> 69 <div class="concept-image"> 70 <img src="image/concept-image@2x.jpg" alt="コンセプトイメージ"> 71 </div> 72 73 </div> 74 <div class="section-bottom concept-bottom text-right">Our concept </div> 75 </div> 76 77 78 </section> 79<!----> 80<!--Works--> 81 <section class="works"> 82 <h2 class="sub-title text-right text-white works-title">works</h2> 83 <ul class="works-list"> 84 <li class="works-item"> 85 <a href="#"> 86 <p class="works-text"> 87 新規サイトを公開しました。今回のサイトは <br> 88 白と黒を基調にしたミニマルなデザインに <br> 89 なっています。 90 </p> 91 </a> 92 <div class="works-image"><img src="image/card-img01@2x.jpg" alt="" ></div> 93 </li> 94 <li class="works-item"> 95 <a href="#"> 96 <p class="works-text"> 97 新規サイトを公開しました。今回のサイトは <br> 98 白と黒を基調にした 99 </p> 100 </a> 101 <div class="works-image"><img src="image/card-img02@2x.jpg" alt="" ></div> 102 </li> 103 <li class="works-item"> 104 <a href="#"> 105 <p class="works-text"> 106 新規サイトを公開しました。今回のサイトは <br> 107 白と黒を基調にしたミニマルなデザインに <br> 108 なっています。 109 </p> 110 </a> 111 <div class="works-image"><img src="image/card-img03@2x.jpg" alt="" ></div> 112 </li> 113 </ul> 114 <div class="works-link cmn-link"> 115 <a href="#"> 116 <p>View more</p> 117 </a> 118 </div> 119 120 <div class="section-bottom text-white">Our works </div> 121 </section> 122<!----> 123 124<!--Service--> 125 <section class="service"> 126 <h2 class="sub-title">Service</h2> 127 <ul class="service-list"> 128 <li class="service-item service1"><a href="#">Hearing</a></li> 129 <li class="service-item service2"><a href="#">Planning</a></li> 130 <li class="service-item service3"><a href="#">Direction</a></li> 131 </ul> 132 133 <div class="section-bottom text-right">Our service </div> 134 </section> 135<!----> 136<!--Contact--> 137<section class="contact bg-contact"> 138 <h2 class="sub-title text-right text-white contact-title">Contact</h2> 139 <div class="contact-inner"> 140 141 <p class="contact-text">お気軽にご相談ください。</p> 142 <a href="./contact" class="cmn-link contact-link">Contact</a> 143 <div class="section-bottom text-white">Contact us </div> 144 </div> 145 146</section> 147<!----> 148 149 </main> 150<!--メイン--> 151 152 153<footer class="footer"> 154 <small>&copy; cresta.design all rights reserved</small> 155</footer> 156<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> 157<script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script> 158</body> 159</html>

js

1 2//スッティキーヘッダー 3$(function(){ 4 var $win=$(window), 5 $fv=$('.fv'), 6 $header=$('.header'), 7 fvHeight='$fv.(outerHeight)'; 8 fixedClass='fixed'; 9 10 $win.on('load scroll', function(){ 11 var value=$(this).scrollTop(); 12 if($win.width()>768px){ 13 if(value > fvHeight){ 14 $header.addClass(fixedClass); 15 16 }else{ 17 $header.removeClass(fixedClass); 18 } 19 } 20 21 }); 22 23 24}); 25 26 27 28 29//スライダー 30$(function(){ 31 32 33$(".slider").slick({ 34 autoplay: true, 35 autoplaySpeed: 2000, 36 fade: true, 37 speed: 1000, 38 cssEase: 'linear' 39 40}); 41});

試したこと

ここに問題に対して試したことを記載してください。
試したことは原因をみつけるために、削除しながら、エラーの確認をしました。
・768pxの部分が原因っぽいので、mexin部分をmin-widthやmax-widthなどを確認しながら行いました。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

お察しの通りです。

原因は【if($win.width()>768px){】のようです(768を消すとエラーも消えます)

javascript

1$win.width()>768px

ではなく、

javascript

1$win.width()>768

にしてください。

余白の件につきましては、スクリーンショットを添付するなどしないとどの部分が不要な余白でどの部分が意図した余白なのかおそらく判断できません。

また、スタイルシートの情報もないのでそもそもどのような画面がレンダリングされるかもわからないです。

投稿2021/06/16 12:44

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

free_teku

2021/06/16 13:14

ご回答いただきありがとうございます。 jsに関しては直りました。 余白については添付いたします。 度々申し訳ございませんが、ご回答いただけると幸いです。
退会済みユーザー

退会済みユーザー

2021/06/16 14:22 編集

添付拝見しました。Windowsのツールバーと同じ幅になるように広げたいということでしょうか?ウェブページのレイアウトに関する情報はスタイルシート(`css/destyle.css` と `css/style.css`)に定義されてますので、そちらの内容も質問本文に追記してください。
free_teku

2021/06/16 16:20

大変申し訳ございませんが、CSSが字数制限により、どちらも表示できませんでした。そのため下記にお送りいたします。
free_teku

2021/06/16 17:37

/*! destyle.css v2.0.2 | MIT License | https://github.com/nicolas-cusan/destyle.css */ /* Reset box-model and set borders */ /* ============================================ */ *, ::before, ::after { box-sizing: border-box; border-style: solid; border-width: 0; } /* Document */ /* ============================================ */ /** * 1. Correct the line height in all browsers. * 2. Prevent adjustments of font size after orientation changes in iOS. * 3. Remove gray overlay on links for iOS. */ html { line-height: 1.15; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ -webkit-tap-highlight-color: transparent; /* 3*/ } /* Sections */ /* ============================================ */ /** * Remove the margin in all browsers. */ body { margin: 0; } /** * Render the `main` element consistently in IE. */ main { display: block; } /* Vertical rhythm */ /* ============================================ */ p, table, blockquote, address, pre, iframe, form, figure, dl { margin: 0; } /* Headings */ /* ============================================ */ h1, h2, h3, h4, h5, h6 { font-size: inherit; line-height: inherit; font-weight: inherit; margin: 0; } /* Lists (enumeration) */ /* ============================================ */ ul, ol { margin: 0; padding: 0; list-style: none; } /* Lists (definition) */ /* ============================================ */ dt { font-weight: bold; } dd { margin-left: 0; } /* Grouping content */ /* ============================================ */ /** * 1. Add the correct box sizing in Firefox. * 2. Show the overflow in Edge and IE. */ hr { box-sizing: content-box; /* 1 */ height: 0; /* 1 */ overflow: visible; /* 2 */ border-top-width: 1px; margin: 0; clear: both; color: inherit; } /** * 1. Correct the inheritance and scaling of font size in all browsers. * 2. Correct the odd `em` font sizing in all browsers. */ pre { font-family: monospace, monospace; /* 1 */ font-size: inherit; /* 2 */ } address { font-style: inherit; } /* Text-level semantics */ /* ============================================ */ /** * Remove the gray background on active links in IE 10. */ a { background-color: transparent; text-decoration: none; color: inherit; } /** * 1. Remove the bottom border in Chrome 57- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. */ abbr[title] { text-decoration: underline; /* 2 */ text-decoration: underline dotted; /* 2 */ } /** * Add the correct font weight in Chrome, Edge, and Safari. */ b, strong { font-weight: bolder; } /** * 1. Correct the inheritance and scaling of font size in all browsers. * 2. Correct the odd `em` font sizing in all browsers. */ code, kbd, samp { font-family: monospace, monospace; /* 1 */ font-size: inherit; /* 2 */ } /** * Add the correct font size in all browsers. */ small { font-size: 80%; } /** * Prevent `sub` and `sup` elements from affecting the line height in * all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } /* Embedded content */ /* ============================================ */ /** * Prevent vertical alignment issues. */ img, embed, object, iframe { vertical-align: bottom; } /* Forms */ /* ============================================ */ /** * Reset form fields to make them styleable */ button, input, optgroup, select, textarea { -webkit-appearance: none; appearance: none; vertical-align: middle; color: inherit; font: inherit; background: transparent; padding: 0; margin: 0; outline: 0; border-radius: 0; text-align: inherit; } /** * Reset radio and checkbox appearance to preserve their look in iOS. */ [type="checkbox"] { -webkit-appearance: checkbox; appearance: checkbox; } [type="radio"] { -webkit-appearance: radio; appearance: radio; } /** * Show the overflow in IE. * 1. Show the overflow in Edge. */ button, input { /* 1 */ overflow: visible; } /** * Remove the inheritance of text transform in Edge, Firefox, and IE. * 1. Remove the inheritance of text transform in Firefox. */ button, select { /* 1 */ text-transform: none; } /** * Correct the inability to style clickable types in iOS and Safari. */ button, [type="button"], [type="reset"], [type="submit"] { cursor: pointer; -webkit-appearance: none; appearance: none; } button[disabled], [type="button"][disabled], [type="reset"][disabled], [type="submit"][disabled] { cursor: default; } /** * Remove the inner border and padding in Firefox. */ button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; } /** * Restore the focus styles unset by the previous rule. */ button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; } /** * Remove arrow in IE10 & IE11 */ select::-ms-expand { display: none; } /** * Remove padding */ option { padding: 0; } /** * Reset to invisible */ fieldset { margin: 0; padding: 0; min-width: 0; } /** * 1. Correct the text wrapping in Edge and IE. * 2. Correct the color inheritance from `fieldset` elements in IE. * 3. Remove the padding so developers are not caught out when they zero out * `fieldset` elements in all browsers. */ legend { color: inherit; /* 2 */ display: table; /* 1 */ max-width: 100%; /* 1 */ padding: 0; /* 3 */ white-space: normal; /* 1 */ } /** * Add the correct vertical alignment in Chrome, Firefox, and Opera. */ progress { vertical-align: baseline; } /** * Remove the default vertical scrollbar in IE 10+. */ textarea { overflow: auto; } /** * Correct the cursor style of increment and decrement buttons in Chrome. */ [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; } /** * 1. Correct the outline style in Safari. */ [type="search"] { outline-offset: -2px; /* 1 */ } /** * Remove the inner padding in Chrome and Safari on macOS. */ [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * 1. Correct the inability to style clickable types in iOS and Safari. * 2. Change font properties to `inherit` in Safari. */ ::-webkit-file-upload-button { -webkit-appearance: button; /* 1 */ font: inherit; /* 2 */ } /** * Clickable labels */ label[for] { cursor: pointer; } /* Interactive */ /* ============================================ */ /* * Add the correct display in Edge, IE 10+, and Firefox. */ details { display: block; } /* * Add the correct display in all browsers. */ summary { display: list-item; } /* * Remove outline for editable content. */ [contenteditable] { outline: none; } /* Table */ /* ============================================ */ table { border-collapse: collapse; border-spacing: 0; } caption { text-align: left; } td, th { vertical-align: top; padding: 0; } th { text-align: left; font-weight: bold; } /* Misc */ /* ============================================ */ /** * Add the correct display in IE 10+. */ template { display: none; } /** * Add the correct display in IE 10. */ [hidden] { display: none; }
free_teku

2021/06/16 17:39

@charset "UTF-8"; html { font-size: 62.5%; } body { max-width: 1440px; max-height: 752px; background-color: #fff; font-size: 1.6rem; letter-spacing: .05em; color: #171717; font-family: 'Noto Serif' 'Noto Serif JP' serif; } img { width: 100%; height: auto; vertical-align: bottom; /*余白ができるから指定する*/ } a { text-decoration: none; } /*共通項*/ @media print, screen and (max-width: 768px) { .section-wrapper { padding: 100px 0 40px; } } .sub-title { max-width: 1000px; color: #282f35; font-size: 6rem; font-style: italic; margin: 0 auto 80px; padding: 0 20px; } @media print, screen and (max-width: 768px) { .sub-title { padding: 0 4vw; font-size: 3rem; margin-bottom: 50px; } } /*擬似要素*/ .sub-title::after { content: ""; display: inline-block; background-color: #282f35; width: 200px; height: 5px; margin-left: 30px; vertical-align: middle; /*線を中央揃え*/ color: #282F35; } .section-inner { max-width: 1000px; margin: 0 auto; padding: 0 50px; } @media print, screen and (max-width: 768px) { .section-inner { padding: 0 4vw; } } .text-right { text-align: right; } .text-white { color: #fff; } .text-white::after { background-color: #fff; } .section-bottom { max-width: 1200px; margin: 0 auto; margin-top: 70px; margin-bottom: 70px; font-size: 9rem; opacity: .05; } @media print, screen and (max-width: 768px) { .section-bottom { font-size: 4rem; padding: 0 4vw; } } /*ボタン*/ .cmn-link { width: 235px; line-height: 60px; margin: 0 auto 70px; background-color: #F7D43F; border: 0px 0px 6px #1b1310; -webkit-box-shadow: #1B1310; box-shadow: #1B1310; border-radius: 30px; text-align: center; color: #171717; font-weight: bold; text-decoration: none; -webkit-transition: .3s; transition: .3s; } @media print, screen and (max-width: 768px) { .cmn-link { margin-bottom: 40px; } } .cmn-link:hover { opacity: .7; -webkit-transition: .3s; transition: .3s; } /*レスポンシブ対応*/ .header { padding: 19px 30px; -webkit-box-sizing: border-box; box-sizing: border-box; width: 1440px; height: 752px; position: relative; /*ヘッダーfixed対応*/ -webkit-transition: .3s; transition: .3s; /*ボタン*/ } .header .header.fixed { position: fixed; background: #282f35; padding: 30px; width: 100%; -webkit-transition: .3s; transition: .3s; } @media print, screen and (max-width: 768px) { .header .header { padding: 30px 4vw; } } .header .header-inner { /*display: flex; justify-content: space-between; align-items: center; position: absolute; top: 0; left: 0; right: 0; z-index: 1;*/ /*color: #fff; display: flex; justify-content: space-between; align-items: center; // margin-top: 20px;*/ } .header .header-inner #logo { padding-left: 120px; margin-top: 19px; font-family: 'Noto Serif'; } .header .header-inner #logo > p { font-size: 2.6rem; color: #fff; } @media print, screen and (max-width: 768px) { .header .header-inner .header-wrapper .nav { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: #282f35; } } .header .header-inner .header-wrapper .nav .header-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; margin-right: 120px; } .header .header-inner .header-wrapper .nav .header-list .list-item { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; } .header .header-inner .header-wrapper .nav .header-list .list-item > a { text-transform: inherit; font-size: 16px; color: #fff; -webkit-transition: .3s; transition: .3s; font-weight: bold; font-style: italic; } .header .header-inner .header-wrapper .nav .header-list .list-item + .list-item { padding-left: 30px; } .header .burger-btn { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .header .image-inner .fv { background-position: center; background-size: cover; background-repeat: no-repeat; } .header .image-inner .fv .img { height: 100vh; -o-object-fit: cover; object-fit: cover; } .header .image-inner .image-message { position: absolute; top: 400px; left: 177px; padding-bottom: 170px; } .header .image-inner .image-message > p { font-size: 5rem; line-height: 1.4; color: #fff; } .header .image-inner .image-message .sp-br { display: block; } @media print, screen and (max-width: 768px) { .header .image-inner .image-message .sp-br .sp-br { display: none; } } .concept { max-height: 811px; margin: 10rem 12rem 7rem 22rem; } .section-inner { text-align: center; } .section-inner .message { text-align: center; font-size: 3rem; margin-bottom: 60px; font-weight: bold; line-height: 1.6; font-size: 3rem; } @media print, screen and (max-width: 768px) { .section-inner .message { font-size: 2rem; padding: 70px 45px 30px; } } .section-inner .explain { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-justify-content: space-around; -ms-flex-pack: distribute; justify-content: space-around; } @media print, screen and (max-width: 768px) { .section-inner .explain { display: block; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; margin-bottom: 40px; } } .section-inner .explain .text { display: block; max-width: 440px; line-height: 1.9; font-weight: bold; margin-top: 10px; margin-left: 15px; } @media print, screen and (max-width: 768px) { .section-inner .explain .text { padding: 20px 15px; } } .section-inner .explain .concept-image { max-width: 440px; height: 240px; margin-left: 20px; } @media print, screen and (max-width: 768px) { .section-inner .explain .concept-image { padding: 20px 15px; margin: 0; } } @media print, screen and (max-width: 768px) { .section-inner .pc-br { display: none; } }
free_teku

2021/06/16 17:39

.works { max-width: 1440px; background-image: url(../../image/works-bgi@2x.jpg); background-size: cover; background-position: center; background-repeat: no-repeat; } .works-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; padding: 80px 220px 80px 220px; text-align: center; margin: 0 auto; } @media print, screen and (max-width: 768px) { .works-list { display: block; padding: 0 4vw; margin: 50px 27px 80px; } } .works-list .works-item { background: #fff; width: 32%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; border: 1px solid; } .works-list .works-item + .work-item { margin-left: 20px; border: 1px solid; } @media print, screen and (max-width: 768px) { .works-list .works-item { width: 320px; width: 100%; margin: 0 auto 30px; } } .works-list .works-item .works-text { padding: 25px 20px; text-align: center; } .works-list .works-item .works-text .works-text:nth-child(even) { padding: 15px 20px 53px 20px; } .works-list .works-link { padding: 80px 602px 247px 602px; } .service { margin: 0 auto; } .service-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } @media print, screen and (max-width: 768px) { .service-list { display: block; margin-bottom: 40px; padding: 0 4vw; } } .service-list .service-item { width: 33.3%; text-align: center; } @media print, screen and (max-width: 768px) { .service-list .service-item { margin: 0 auto; width: 100%; background-repeat: no-repeat; } .service-list .service-item + .service-item { padding-top: 30px; } } .service-list .service-item > a { width: 100%; text-align: center; color: #fff; line-height: 320px; font-size: 4rem; font-weight: bold; font-style: italic; } @media print, screen and (max-width: 768px) { .service-list .service-item > a { line-height: 250px; text-align: center; } } .service-list .service-item > a:hover { background-color: rgba(40, 47, 53, 0.7); -webkit-transition: .3s; transition: .3s; } .service-list .service1 { background-image: url(../../image/service-img01@2x.jpg); } .service-list .service2 { background-image: url(../../image/service-img02@2x.jpg); } .service-list .service3 { background-image: url(../../image/sevice-img03@2x.jpg); } .bg-contact { background-image: url(../../image/contact-bgi@2x.jpg); background-position: center; background-repeat: no-repeat; background-size: cover; } .contact-title { padding-top: 105px; } .contact-inner .contact-text { text-align: center; color: #fff; margin-bottom: 40px; } .contact-inner .contact-link { display: block; text-align: center; } .footer { background-color: #fff; } .footer > small { display: block; padding: 30px 0; font-size: 1.4rem; color: #282f35; text-align: center; } /*# sourceMappingURL=style.css.map */
退会済みユーザー

退会済みユーザー

2021/06/17 01:50

画像がWindowsのツールバーと同じ幅になるように広げたいということでしょうか?
free_teku

2021/06/17 03:10

完成図を添付いたしました。何卒宜しくお願い致します。m(__)m
free_teku

2021/06/18 04:56

windowsのツールバーと同じ幅を意味しております。何卒宜しくお願い致します。m(__)m
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問