'Programming/css'에 해당되는 글 23건

  1. 2018.08.21 css BEM( Block Element Modifier)
  2. 2018.08.20 css float overflow
  3. 2018.08.09 css 우선순위
  4. 2016.01.11 css 문법 - id / class
  5. 2016.01.11 html css 적용 방법
  6. 2015.09.24 css margin / padding
  7. 2015.09.22 css body background
  8. 2015.09.18 CSS / JS 파일 용량 줄이기
  9. 2015.09.14 css selector
  10. 2015.09.08 css 관련 4
Programming/css2018. 8. 21. 18:13

css를 작성하다 보니

어떻게 운용해야 할지 고민하다가 찾는중.

BEM은 일종의 클래스 명 작성규칙이고

쓰기 나름이긴 한데.. 어떤식으로 운영하는게 나을지 모르겠다...


예를들면.. 색상에 대한 class와 font에 대한 클래스를 구분하고

사용하는 곳에서 복수개의 class를 사용하는 방법과


특성에 따른 class를 개별로 정의하여 사용하냐 정도의 차이?


[링크 : https://www.vobour.com/-css-디버깅-시간을-절약-할-수있는-css-명명-규칙]

[링크 : https://windtale.net/blog/maintainable-expandable-front-end-web-strategy/]

[링크 : http://wikibootup.org/post/css-co-work/]

[링크 : https://hyeonseok.com/docs/about-css/]


'Programming > css' 카테고리의 다른 글

hover inline css  (0) 2018.08.27
css selector  (0) 2018.08.21
css float overflow  (0) 2018.08.20
css 우선순위  (0) 2018.08.09
css 문법 - id / class  (0) 2016.01.11
Posted by 구차니
Programming/css2018. 8. 20. 13:22

모든 것의 원흉은 이녀석이었나..

단순하게 div를 왼쪽부터 딱딱딱 원하는 순서로 쌓는용도로만 생각을 했는데

말그대로 float 하게 하는거라 내가 의도하는 것과는 전혀 다른 형태로 작동해서 멘붕중


정 안되면

style="clear:both;" 와

style="overflow:hidden;" 을 해주면 내가 쓰려는 용도로는 충분하네..


[링크 : http://naradesign.net/wp/2008/05/27/144/]

[링크 : http://blog.wystan.net/2008/09/11/css-overflow-clearing-float]


overflow:hidden은 float로 하면 구성요소에서 빠져나가

상위 div의 높이 계산이 갱신되지 않는데, overflow:hidden을 해주면 float로 된 div를 포함하여 높이를 계산한다.

'Programming > css' 카테고리의 다른 글

css selector  (0) 2018.08.21
css BEM( Block Element Modifier)  (0) 2018.08.21
css 우선순위  (0) 2018.08.09
css 문법 - id / class  (0) 2016.01.11
html css 적용 방법  (0) 2016.01.11
Posted by 구차니
Programming/css2018. 8. 9. 20:56

인라인 스타일이 우선

id로 지정된 것이 다음

태그로 지정된건 가장 나중


id랑 class랑 싸우면 어떻게 되려나?


[링크 : https://opentutorials.org/module/484/4149]

[링크 : https://www.w3schools.com/css/css_specificity.asp]


요건 class 여러개 사용시 우선순위 관련

!important가 우선시되고

css 파일상에 가장 마지막에 선언된 클래스가 우선권을 가진다고

[링크 : https://stackoverflow.com/questions/3066356/...defined]

'Programming > css' 카테고리의 다른 글

css BEM( Block Element Modifier)  (0) 2018.08.21
css float overflow  (0) 2018.08.20
css 문법 - id / class  (0) 2016.01.11
html css 적용 방법  (0) 2016.01.11
css margin / padding  (0) 2015.09.24
Posted by 구차니
Programming/css2016. 1. 11. 14:02



The id Selector

The id selector uses the id attribute of an HTML element to select a specific element.

The id of an element should be unique within a page, so the id selector is used to select one unique element!

To select an element with a specific id, write a hash (#) character, followed by the id of the element.

The style rule below will be applied to the HTML element with id="para1":


The class Selector

The class selector selects elements with a specific class attribute.

To select elements with a specific class, write a period (.) character, followed by the name of the class.

In the example below, all HTML elements with class="center" will be red and center-aligned:


[링크 : http://www.w3schools.com/css/css_syntax.asp]


id는 유일한 거라고 하지만.. 크롬이나 ie에서 실험적으로 해봐도

경고나 에러를 띄우진 않는데.. 머가 맞는걸려나..

[링크 : http://okky.kr/article/89313]

[링크 : http://www.homejjang.com/07/class_id.php

'Programming > css' 카테고리의 다른 글

css float overflow  (0) 2018.08.20
css 우선순위  (0) 2018.08.09
html css 적용 방법  (0) 2016.01.11
css margin / padding  (0) 2015.09.24
css body background  (0) 2015.09.22
Posted by 구차니
Programming/css2016. 1. 11. 10:32

크게는 세가지

1. html에 style을 이용해서 적용

<head>

<style>

...

</style>

<head> 


2. css를 끌어와서 적용

<head>

<link rel="stylesheet" type="text/css" href="./style.css">

</head> 


3. 어트리뷰트로 사용

<h1 style="color:blue;">This is a Blue Heading</h1> 



[링크 : http://www.w3schools.com/html/html_css.asp]

'Programming > css' 카테고리의 다른 글

css 우선순위  (0) 2018.08.09
css 문법 - id / class  (0) 2016.01.11
css margin / padding  (0) 2015.09.24
css body background  (0) 2015.09.22
CSS / JS 파일 용량 줄이기  (0) 2015.09.18
Posted by 구차니
Programming/css2015. 9. 24. 09:31

마진은 밖으로

패딩은 안으로


[링크 : http://blognike.tistory.com/8]

'Programming > css' 카테고리의 다른 글

css 문법 - id / class  (0) 2016.01.11
html css 적용 방법  (0) 2016.01.11
css body background  (0) 2015.09.22
CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css selector  (0) 2015.09.14
Posted by 구차니
Programming/css2015. 9. 22. 10:58

헐.. 어쩐지.. 암만 찾아도 게임 홈페이지 배경에 이쁜게

html 소스에 안보이더라니 ㄷㄷ


[링크 : http://www.w3schools.com/cssref/css3_pr_background.asp]

'Programming > css' 카테고리의 다른 글

html css 적용 방법  (0) 2016.01.11
css margin / padding  (0) 2015.09.24
CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css selector  (0) 2015.09.14
css 관련  (4) 2015.09.08
Posted by 구차니
Programming/css2015. 9. 18. 10:01


[링크 : http://refresh-sf.com/] 줄바꿈 없애서 용량 줄이기

    [링크 : http://demun.tistory.com/2148]

[링크 : http://blog.munilive.com/php-css-js-file-compression-send-htaccess-use/] 헤더 사용 압축


minify / beautify

[링크 : http://dev.nkia.net:8089/?p=730]

'Programming > css' 카테고리의 다른 글

css margin / padding  (0) 2015.09.24
css body background  (0) 2015.09.22
css selector  (0) 2015.09.14
css 관련  (4) 2015.09.08
css box model  (0) 2014.05.15
Posted by 구차니
Programming/css2015. 9. 14. 11:32

엇.. css에서 >는 연산자가 맞긴한데.. 비교가 아니었구나

div > p는 div 하위의 p 에 대해서 css를 적용한다 라는 의미

즉, div 안에서 쓰는 p와 그냥 p를 서로 다르게 줄 수 있다는 것


element,element div, p Selects all <div> elements and all <p> elements 1

element element div p Selects all <p> elements inside <div> elements 1

element>element div > p Selects all <p> elements where the parent is a <div> element 2

element+element div + p Selects all <p> elements that are placed immediately after <div> elements 2

element1~element2 p ~ ul Selects every <ul> element that are preceded by a <p> element


[링크 : http://www.w3schools.com/cssref/css_selectors.asp]


tag

{

property: value value2 value3;

}

[링크 : http://www.w3schools.com/cssref/default.asp]

'Programming > css' 카테고리의 다른 글

css body background  (0) 2015.09.22
CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css 관련  (4) 2015.09.08
css box model  (0) 2014.05.15
크롬과 IE에서 CSS 차이점 - body / background-color  (2) 2011.03.09
Posted by 구차니
Programming/css2015. 9. 8. 14:44

CSS도 공부해보자 -_-!!!





HTML comments : <!-- 로 시작하고 -->로 끝난다. 

CSS comments : /* 로 시작하고 */


[링크 : https://nolboo.github.io/blog/2013/07/22/beginners-guide-to-html-and-css-1-slash-10/]



<link href="style.css" rel="stylesheet" type="text/css">


<style type="text/css">

@import url(style.css); 

</style>


<style type="text/css">

.logo {color: #eeeeee;} 

</style>


<p style="height:100px; color:blue">

[링크 : http://webdir.tistory.com/338]



The selector points to the HTML element you want to style.

The declaration block contains one or more declarations separated by semicolons.

[링크 : http://www.w3schools.com/css/css_syntax.asp]

[링크 : http://www.w3schools.com/css/default.asp]


+ 2015.09.16

Inline Styling (Inline CSS)

Internal Styling (Internal CSS)

External Styling (External CSS)

[링크 : http://www.w3schools.com/html/html_css.asp]

'Programming > css' 카테고리의 다른 글

CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css selector  (0) 2015.09.14
css box model  (0) 2014.05.15
크롬과 IE에서 CSS 차이점 - body / background-color  (2) 2011.03.09
CSS Naked day!  (2) 2009.04.09
Posted by 구차니