<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webサイト  |  ITのあれこれ</title>
	<atom:link href="https://himatoto.com/tag/web%E3%82%B5%E3%82%A4%E3%83%88/feed/" rel="self" type="application/rss+xml" />
	<link>https://himatoto.com</link>
	<description>初心者視点で分かりやすく</description>
	<lastBuildDate>Mon, 31 Aug 2020 05:29:33 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.1</generator>

<image>
	<url>https://himatoto.com/wp-content/uploads/2020/06/cropped-4495bed8051fcc9fd4ac4bababda36e3-32x32.png</url>
	<title>Webサイト  |  ITのあれこれ</title>
	<link>https://himatoto.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>【Bootstrap】スマートフォンの時だけ改行する</title>
		<link>https://himatoto.com/bootstrap1/</link>
					<comments>https://himatoto.com/bootstrap1/#respond</comments>
		
		<dc:creator><![CDATA[himatoto]]></dc:creator>
		<pubDate>Sat, 18 Jul 2020 03:08:09 +0000</pubDate>
				<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Webデザイン]]></category>
		<category><![CDATA[Webページ]]></category>
		<category><![CDATA[Webサイト]]></category>
		<guid isPermaLink="false">https://himatoto.com/?p=200</guid>

					<description><![CDATA[Bootstrapを利用して便利だと感じたことをまとめてます。 困った時に参考にして頂ければと思います。 （Bootstrapの逆引きとして参考にして頂ければと思います。） ※Bootstrap4での記述となります。 目 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Bootstrapを利用して便利だと感じたことをまとめてます。</p>



<p>困った時に参考にして頂ければと思います。</p>



<p>（Bootstrapの逆引きとして参考にして頂ければと思います。）</p>



<p>※Bootstrap4での記述となります。</p>




  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">横のサイズ</a></li><li><a href="#toc2" tabindex="0">スマートフォン表示の時改行する</a></li><li><a href="#toc3" tabindex="0">パソコン表示の時改行する</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">横のサイズ</span></h2>



<p>bootstrapでは横のサイズを表す時にclass名の一部に「sm, md, lg, xl」を使用します。</p>



<p>それぞれのclass名が表しているサイズは下記の通りです。</p>



<figure class="wp-block-table aligncenter">
<div class="scrollable-table"><table style="width: 80%; height: 207px;">
<thead>
<tr style="height: 42px;">
<th style="height: 42px;">サイズをあらわすclass</th>
<th style="height: 42px;">サイズ</th>
</tr>
</thead>
<tbody>
<tr style="height: 42px;">
<td style="height: 42px; text-align: center;">sm</td>
<td style="height: 42px;">576px以上</td>
</tr>
<tr style="height: 41px;">
<td style="height: 41px; text-align: center;">md</td>
<td style="height: 41px;">768px以上</td>
</tr>
<tr style="height: 41px;">
<td style="height: 41px; text-align: center;">lg</td>
<td style="height: 41px;">992px以上</td>
</tr>
<tr style="height: 41px;">
<td style="height: 41px; text-align: center;">xl</td>
<td style="height: 41px;">1200px以上</td>
</tr>
</tbody>
</table></div>
</figure>



<h2 class="wp-block-heading"><span id="toc2">スマートフォン表示の時改行する</span></h2>



<p>スマートフォン表示の時だけ改行させたい！</p>



<p>そんな場合のclass指定の方法について説明します。</p>



<p><span class="marker-under-red">brタグ（改行）のclassに「d-sm-none」を指定すると、スマートフォン表示時に改行が有効になります。</span></p>



<pre class="wp-block-code"><code>&lt;p>あいうえお&lt;br class="d-sm-none" />かきくけこ&lt;/p></code></pre>



<div class="wp-block-cocoon-blocks-column-2 column-wrap column-2 column-2-2-1-1 layout-box">
<div class="wp-block-cocoon-blocks-column-left column-left">
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="https://himatoto.com/wp-content/uploads/2020/07/bootstrap-1.png" alt="" class="wp-image-311" width="357" height="223" srcset="https://himatoto.com/wp-content/uploads/2020/07/bootstrap-1.png 640w, https://himatoto.com/wp-content/uploads/2020/07/bootstrap-1-300x188.png 300w" sizes="(max-width: 357px) 100vw, 357px" /><figcaption>パソコン表示イメージ</figcaption></figure></div>
</div>



<div class="wp-block-cocoon-blocks-column-right column-right">
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img decoding="async" src="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp-2.png" alt="" class="wp-image-312" width="357" height="223" srcset="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp-2.png 640w, https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp-2-300x188.png 300w" sizes="(max-width: 357px) 100vw, 357px" /><figcaption>スマートフォン表示イメージ</figcaption></figure></div>
</div>
</div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box"><div class="label-box-label block-box-label box-label"><span class="label-box-label-text block-box-label-text box-label-text">少し詳しく</span></div><div class="label-box-content block-box-content box-content">
<p>d-sm-none・・・表示領域が576px以上の場合、改行タグが非表示になります。</p>



<p>「sm」の部分を「md」「lg」「xl」に変更することでそれぞれのサイズで表示・表示の調整ができます。</p>
</div></div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box"><div class="label-box-label block-box-label box-label"><span class="label-box-label-text block-box-label-text box-label-text">もっと詳しく</span></div><div class="label-box-content block-box-content box-content">
<p>下記表示は、Bootstrapのクラス名とそのクラス名内で書かれているCSSの対応表です。</p>



<figure class="wp-block-table">
<div class="scrollable-table"><table style="width: 100%; height: 196px;">
<thead>
<tr style="height: 42px;">
<th style="height: 42px;">Bootstrapのクラス名</th>
<th style="height: 42px;">CSS</th>
</tr>
</thead>
<tbody>
<tr style="height: 154px;">
<td style="height: 154px;">d-sm-none</td>
<td style="height: 154px;">@media&nbsp;(min-width:576px){<br>&nbsp; .d-sm-none{<br>&nbsp; &nbsp; display:none!important<br>&nbsp; }<br>}</td>
</tr>
</tbody>
</table></div>
</figure>



<p>※表示・表示に関係する部分を記載してます。</p>
</div></div>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><span id="toc3">パソコン表示の時改行する</span></h2>



<p>上記で記載した内容の逆のパターン。</p>



<p>パソコン表示の時だけ表示させたい！</p>



<p>そんな時のclassの指定の方法を説明します。</p>



<pre class="wp-block-code"><code>&lt;p>あいうえお&lt;br class="d-none d-lg-inline" />かきくけこ&lt;/p></code></pre>



<p><span class="marker-under-red">brタグ（改行）のclassに「d-none」と「d-lg-inline」を指定すると、パソコン表示時に改行が有効になります。</span></p>



<div class="wp-block-cocoon-blocks-column-2 column-wrap column-2 column-2-2-1-1 layout-box">
<div class="wp-block-cocoon-blocks-column-left column-left">
<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="640" height="400" src="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_2.png" alt="" class="wp-image-317" srcset="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_2.png 640w, https://himatoto.com/wp-content/uploads/2020/07/bootstrap_2-300x188.png 300w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption>パソコン表示イメージ</figcaption></figure></div>
</div>



<div class="wp-block-cocoon-blocks-column-right column-right">
<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="640" height="400" src="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp_2.png" alt="" class="wp-image-318" srcset="https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp_2.png 640w, https://himatoto.com/wp-content/uploads/2020/07/bootstrap_sp_2-300x188.png 300w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption>スマートフォン表示イメージ</figcaption></figure></div>
</div>
</div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box"><div class="label-box-label block-box-label box-label"><span class="label-box-label-text block-box-label-text box-label-text">少し詳しく</span></div><div class="label-box-content block-box-content box-content">
<p>d-none・・・非表示にします。</p>



<p>d-lg-inline・・・表示領域が992px以上の場合、表示（インライン表示）します。</p>



<p>「d-none」で指定したタグを非表示にします。「d-lg-inline」を使用することにより表示領域が992pxの時タグを表示させることができます。</p>



<p>「lg」の部分を「sm」「md」「xl」に変更することでそれぞれのサイズで表示・表示の調整ができます。</p>
</div></div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box"><div class="label-box-label block-box-label box-label"><span class="label-box-label-text block-box-label-text box-label-text">もっと詳しく</span></div><div class="label-box-content block-box-content box-content">
<p>下記表示は、Bootstrapのクラス名とそのクラス名内で書かれているCSSの対応表です。</p>



<figure class="wp-block-table">
<div class="scrollable-table"><table style="width: 100%; height: 237px;">
<thead>
<tr style="height: 42px;">
<th style="height: 42px;">Bootstrapのクラス名</th>
<th style="height: 42px;">CSS</th>
</tr>
</thead>
<tbody>
<tr style="height: 42px;">
<td style="height: 42px;">d-none</td>
<td style="height: 42px;">display:none;</td>
</tr>
<tr style="height: 153px;">
<td style="height: 153px;">d-lg-inline</td>
<td style="height: 153px;">
<div>
<div>@media (min-width:992px){</div>
<div>
<div>
<div>  .d-lg-inline-block{</div>
<div>    display:inline-block!important</div>
<div>  }</div>
</div>
</div>
<div>}</div>
</div>
</td>
</tr>
</tbody>
</table></div>
</figure>



<p>※表示・表示に関係する部分を記載してます。</p>
</div></div>
]]></content:encoded>
					
					<wfw:commentRss>https://himatoto.com/bootstrap1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
