かもメモ

自分の落ちた落とし穴に何度も落ちる人のメモ帳

CSSで文字にボーダー(縁取り)をつけたい。

f:id:kikiki-kiki:20170327123027p:plain

IllustratorPhothop()
Phoshop

1. text-stroke 使


f:id:kikiki-kiki:20170327123709p:plain text-stroke 

IE
-webkit-(Firefox-webkit-text-stroke )

f:id:kikiki-kiki:20170327130903p:plain
/* width | color */
-webkit-text-stroke: 2px #000;


-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #000;

()
 color: transparent

2. text-shadow 使


text-shadow
/* offset-x | offset-y | blur-radius | color */
text-shadow: 1px 1px 0 #000
/* color | offset-x | offset-y | blur-radius */
text-shadow: #000 1px 1px 0

offset-x | offset-y | blur-radius | color,text-shadow()

f:id:kikiki-kiki:20170327141539p:plain
// 上
text-shadow: 2px 2px 0 #000,
             -2px 2px 0 #000,
             2px -2px 0 #000,
             -2px -2px 0 #000;
// 下
text-shadow: 2px 2px 1px #000,
             -2px 2px 1px #000,
             2px -2px 1px #000,
             -2px -2px 1px #000;

()
 color: transparenttext-shadow

text-shadowIE10+使text-shadow 
 offset
 
text-shadow使

CSS text-stroke generator (text-shadow hack)



text-stroke  

text-shadow 



IE10IllustratorPhothoptext-shadow
IEtext-stroketext-stroketext-shadow
f:id:kikiki-kiki:20170327141750p:plain

SVG

See the Pen OUTLINE TEXT Test by KIKIKI (@chaika-design) on CodePen.


[]

はじめてのCSS設計 フロントエンドエンジニアが教えるメンテナブルなCSS設計手法 (WEB Engineer’s Books)

はじめてのCSS設計 フロントエンドエンジニアが教えるメンテナブルなCSS設計手法 (WEB Engineer’s Books)