- ベストアンサー
html
- みんなの回答 (2)
- 専門家の回答
質問者が選んだベストアンサー
HTMLじゃなくてCSSの話ですね。 background-image: url(''); イメージファイルの指定 background-position: top center; 上・中央揃え background-size: cover; 表示領域に合わせて画像のサイズを伸縮 background-repeat: no-repeat; 繰り返しで埋めない を一括で指定したものです。
その他の回答 (1)
- t_hirai
- ベストアンサー率27% (157/577)
dotinstallというサイトで無料(一部有料)で教えてくれますので、そちらも見てみてください。
関連するQ&A
- HTMLサイトのように…(HTMLについて詳しく分かる方お願いします
<!-- BODY { background-image : url("○○.jpg"); background-attachment: fixed; background-position:0% 100%; background-repeat: no-repeat ; } --> コレを背景画像のタグとせず、HTMLサイトのように、ページに文字として出したいのですが、どうすればできるのですか? 説明下手ですいません´`
- ベストアンサー
- その他([技術者向] コンピューター)
- IEでのbackground-size使用について
IEでbackground-sizeが使えづに困っています。 Firefoxやクロームでは問題なく動作しているのですが IEのみ動作しません。 私の使い方が間違っているのでしょうか。 教えてください body { background: url(./images/wave.gif) no-repeat center center fixed #000; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; -webkit-font-smoothing: antialiased; position:fixed; margin:0; padding:0; border:0; }
- ベストアンサー
- CSS
- スマホブラウザでの背景固定
以下のCSSで背景画像を固定しようと思っています。 PCでは問題なく固定されるのですが、スマホだと 背景画像が固定されず、画面をスクロールすると一緒にくっついてきます。 スマホの場合は別の対処が必要なのでしょうか? body { margin:0 auto; text-align:center; padding:0; background: url(../images/photo01.jpg); background-repeat:no-repeat; background-position:center bottom; background-attachment:fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
- ベストアンサー
- CSS
- 壁紙を二つ固定したい。(HTML)
ホームページを作っていてHTMLで壁紙を左横と真ん中に固定して、二つ表示されるようにしたくて、下記の設定をしたのですが、どちらか一つしか表示されません。説明がわかりにくくてすみません。 どうしたらいいでしょうか?? お手数をおかけしますが、よろしくお願いします。 <head> <style type="text/css"> <!-- body{ background-image: url(画像のURL); background-attachment: fixed; background-repeat: no-repeat; background-position: 55% 50%; body{ background-image: url(画像URL); background-attachment: fixed; background-repeat: repeat-y; background-position: left; } --> </style> </head>
- ベストアンサー
- その他(インターネット・Webサービス)
- no-repeat 0 0
background: url(../img/bg-header.jpg) no-repeat 0 0; のCSSの記述についてなのですが。。。教えてください。 最後の 「0 0」の意味がわかりません。 もしかして、 background-position: right top の意味でいいでしょうか? よろしくお願いいたします。
- ベストアンサー
- HTML
- HTMLでの背景画像設定について
はじめまして。 HP作成初心者なのですが、いろいろとネットで調べながら作成しています。 フレームを使っていて、メニュー画面側のほうに画像をふたつ使いたいと考えています。 それぞれ左上と左下とで固定する画像なのですが、それがどうしてもふたつ同時に表示できません。 <style type="text/css"> <!-- BODY {background-image : url("bg2.jpg");background-position: 100 0%; background-repeat: no-repeat;background-attachment: fixed;} --> </style> <style type="text/css"> <!--BODY {background-image : url("bg.jpg");background-position: 0 100%; background-repeat: no-repeat;background-attachment: fixed;} --> </style> という感じに記述しているのですが、こうすると、下にあるbg.jpgのみが反映されてしまって、bg2.jpgは反映されません。 また、bg2.jpgの上には文字を重ねたいと考えているのですが、そのようにタグを編集してもうまく表示できません。 ご回答よろしくお願いいたします。
- ベストアンサー
- ホームページ作成ソフト
- CSSについて教えて下さい
ホームページビルダーでの経験しかない初心者です。CSSに挑戦していますが不明な点ばかりです。 無料テンプレートを加工していますが下記の内容を教えて頂けませんか。 topとtop2の左側(上下位置は中間)に私が追加したtop3の画像を 表示させたいのですがうまくできません。宜しくお願いいたします。 CSS #bodyid{ background:#eafefe url('img/bg.png'); padding:0; margin:0; text-align:center; } #bg{ width:706px; background:#fff; margin:0 auo; } #top{ width:400px; height:80px; background:url('img/title1.gif') no-repeat center top; text-align:left; } #top2{ width:400px; height:60px; background:url('img/title2.gif') no-repeat center top; text-align:left; } #top3{ position:absolute; left 120px; top 30px; width:100px; height:80px; background:url('img/image555.gif') no-repeat center top; } html <body id="bodyid"> <DIV id="bg"> <div id="top"></div> <div id="top3"></div> <div id="top2"></div>
- ベストアンサー
- その他([技術者向] コンピューター)
- IEのみでCSSのbottomが効かない。
IEのみ、CSSのbottomが効かない現象に悩まされております... こちらを改善する方法をご存知の方は、ご教授いただけますと大変に助かります。。 以下がCSSに記述しているプラグラム内容となります。 body{ position: relative; background-image: url(../image/bg/t_bluestick.jpg), url(../image/pattern/navi_pt.png), url(../image/gnavi/bg.png), url(../image/gnavi/bg_pt.png), url(../image/header/header_img3.png), url(../image/pattern/footer_white_pt.png), url(../image/footer/footer_pt.png), url(../image/pattern/dec_pt_50.png), url(../image/bg/pt_whitetile.png) ; background-repeat: repeat-x, repeat-x, no-repeat, repeat-x, no-repeat, repeat-x, repeat-x, repeat-y, repeat ; background-position: top, center 321px, center 321px, center 311px, center 23px, bottom, bottom, center 10px, center ; background-color: #BFE5FF ; } 何卒よろしくお願い申し上げます。
- ベストアンサー
- CSS
- 壁紙(画像の固定)
http://dsc.jugem.jp/?tid=23 ↑のテンプレを使用するつもりですが、このトップに画像をおきたいのですが、 例えば、壁紙をダウンロードしてきて貼り付けたら、一つの画像がいっぱい反映されるのです。 っていう事は固定すべきですよね? htmlで<STYLE type="text/css"> <!-- BODY { background-image : url("画像URL"); background-attachment: fixed; background-position: 100% 100%; background-repeat: no-repeat ; } --> </STYLE> ↑これは反映されなくて、cssだと反映されます。 しかしcssに、 background-image:url(画像URL) background-repeat:no-repeat; background-position:right bottom; ↑こう入れても反映されません。何故でしょうか?どういうタグを使えばいいのですか?
- 締切済み
- ブログ
- CSSのリストタグでメニューを作ってますがレイアウトが崩れます
CSSでリストタグを使ってメニューを作成してますが、Firefoxだとメニューの幅が広く表示され本文にかぶってしまいレイアウトが崩れてしまいます。ちなみにレイアウトは2段組です。 #menu{ text-align: left; width: 175px; float: left } #menu #text ul{ list-style-type: none; margin: 0; padding: 0; border-top: 1px solid white } #menu #text li{ background-image: url("../navi_yajirusi.gif"); background-repeat: no-repeat; background-position: left center; margin: 0; padding: 0; border-bottom: 1px solid white } #menu #text li a{ color: #fff; text-decoration: none; background-color: #1b328d; background-image: url("../navi_yajirusi.gif"); background-repeat: no-repeat; background-position: left center; display: block; padding: 10px 0 10px 10px; width: 175px } #menu #text li a:hover { color: #fff; background-color: #ff0; background-image: url("../navi_yajirusi.gif"); background-repeat: no-repeat; background-position: left center } どなたか詳しい方よろしくお願いいたします。
- 締切済み
- HTML
お礼
ありがとうございました。