본문 바로가기

전체 글338

[티스토리] 소스코드 이쁘게 삽입하기 (Feat. highlight.js) 08/26/2020 - v10.1.2 개발용 블로그에는 아무래도 소스코드를 삽입할 일이 많은데 티스토리에서 기본으로 제공하는 것은 별로 맘에 들지 않더라고요. 다크 테마를 좋아해서 소스코드라도 다크 테마를 하고 싶기도 했고요. 이래저래 찾아보니 highlight.js가 여전히 쉽고 편해서 많이 쓰는 거 같더라고요. 그래서 저도 이거를 기반으로 꾸미기로 했습니다 !!! highlight.js의 홈페이지는 다음과 같습니다. https://highlightjs.org/ highlight.js 소개 더보기 먼저 링크에 있는 홈페이지로 갑니다. 노란색 박스로 표시한 Usage를 눌러서 사용법을 확인해 봅시다. 필요한 css파일과 js파일을 설정해주고, hljs.initHighlightingOnLoad() 함수를 .. 2020. 8. 27.
[CSS] Combinators Descendant Combinator The descendant combinator uses space. It selects nodes that are descendants of the first selected element. This is a usage example. div span { color: teal; } Child Combinator The child combinator uses >. It selects a node that is direct children of the first element. This is a usage example. ul > li { font-weight: 700; } Adjacent Sibling Combinator The adjacent sibling comb.. 2020. 8. 26.
[CSS] Basic / Grouping Selector Basic Selectors Universal Selector The * selects all elements. We use this selector for applying some property globally. Here is the usage. * { margin: 0; } Type Selector The type selector selects all elements that have the specified HTML tag name. Here is the usage. div { width: 10px; } span { font-size: 12px; } h1 { color: teal; } ID Selector The ID selector selects an element that has the id .. 2020. 8. 24.
[CSS] Syntax The basic syntax of CSS is like below. selector { property: value; } The selector selects which element of HTML tag. The CSS block is specified by { }. The property means which property is applied to the selected tag. The value means what value is applied to the specified property. The : has to be located between property and value. The ; has to be located after the value. This is the example. d.. 2020. 8. 24.
[HTML] script Tag The script tag usually uses when link external JS file to HTML file, or insert script into HTML file. In this post, I'll write about the former one. Include in the head Tag This form is an old style. How it works First, it parses an HTML code. If it meets the script tags, it stops the parsing. It fetches a certain JS file and executes it. Finally, it parses the remaining HTML code. Pros and Cons.. 2020. 8. 24.