Quantcast
Channel: CSSタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8829

(自分用)フロントエンドメモ

$
0
0

項目

  1. コンテナにトリミングせず良い感じに画像をはめ込む
  2. アンカー使ったリンクでPOSTしてvalueを渡す
  3. PDFを表示する
  4. 縦中央寄せ(毎回検索してる気がする)
  5. コンテナ内改行
  6. リンクの下線消す
  7. 区切り線を引く

1.コンテナにトリミングせず良い感じに画像をはめ込む

  • object-fit: contain;
css
img{width:100px;height:100px;object-fit:contain;}

2.アンカー使ったリンクでPOSTしてvalueを渡す

html
<formname="form_ex"action="/index method="post"><inputtype="hidden"name="test_send"value=0><ahref="javascript:フォームのname.submit()">リンク名</a></form>

3.PDFを表示する

  • embed
html
<!--この世で最も優れたタグ--><embedsrc="file_name.pdf"width="800px"height="2100px"/>

4.縦中央寄せ(毎回検索してる気がする)

css
.test{height:150px;line-height:150px;}

5.コンテナ内改行

css
.test{word-wrap:break-word;}

6.リンクの下線消す

css
.test{text-decoration:none;}

7.区切り線を引く

  • hrタグ
  • alignleft,center,rightが入れられる
html
<hrsize="1px"width="600px"color="gray"align="center">

Viewing all articles
Browse latest Browse all 8829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>