๊ฐœ๋ฐœ ๐Ÿพ/HTML,CSS

์ž์ฃผ์“ฐ๋Š” css ์ •๋ฆฌ

JOTOKKI 2021. 2. 5. 19:31
728x90

1. reset.css

reset์€ ๋ณดํ†ต ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” Eric Meyer's ์˜ Reset CSS 2.0์—์„œ css๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ ์‚ฌ์šฉํ•œ๋‹ค.

 

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* added */
a,
button,
input,
textarea { color: inherit; font-size: inherit; font-family: inherit; }
a { text-decoration: none; }
button { cursor: pointer; border:none; background: transparent; }
ul, 
li { list-style: none; }
strong, 
b { font-weight: normal; }

 


2. ๊ทธ ์™ธ 

2-1. ๊ธ€์ž์ˆ˜ ์ œํ•œ ... ์ฒ˜๋ฆฌ

.text_overflow {
    width: 200px; /* ๊ธธ์ด์— ๋งž๊ฒŒ ์ปค์Šคํ…€ */
    height: 20px; /* ๊ธ€์ž์‚ฌ์ด์ฆˆ์— ๋งž๊ฒŒ ์ปค์Šคํ…€ */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

2-2. flex 

.flex_box {
    display: flex; 
    justify-content: center;
    align-items: center;
}

2-3. background gradient

.bg_gradient {
    background: orange;
    background: linear-gradient(45deg, orange, lightgreen);
}

 

๊ทธ ์™ธ ์ผ ํ•˜๋ฉด์„œ ์•ผ๊ธˆ์•ผ๊ธˆ ์ถ”๊ฐ€ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ^^!

 

 

 

 

 

 

 

 

 

 

 

 

 

๋ฐ˜์‘ํ˜•