본문 바로가기

Front-end/Web11

CSS Combinator Selectors div p div 하위의 모든 p div > p div 1 step 밑에만 속한 p div + p div 외부, 바로 다음에 인접한 p div ~ p div 외부, 다음 step에 있는 모든 p 참고 https://www.w3schools.com/css/css_combinators.asp CSS Combinators W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com 2022. 7. 12.
Github page deploy Error 모음 연결되는 글 https://javannspring.tistory.com/276 깃헙 웹페이지 올리기 github.io 1. gh-pages 설치 npm i gh-pages 2. pakage.json 홈페이지 설정 "homepage": "{username}.github.io/{project name}" 3. pakage.json deploy script 생성 1) npm run build 실행 2) build 폴더 생성 3) paka.. javannspring.tistory.com github page 설정시 나오는 에러 해결 방법 1. 404 가 나올경우 페이지를 못찾는 경우 package.json에 homepage url 을 잘못 설정했을 가능성이 높다. "homepage" : "https://{{Us.. 2022. 5. 18.
[Apache] OPTIONS, HEAD 등 불필요 Method 막기 httpd.conf 또는 httpd-ssl.conf 파일에서 또는 밑에 추가한다 (위 경로는 적용하고 싶은 웹소스가 있는 경로이다) RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(DELETE|TRACE|OPTIONS|PATCH|HEAD)$ RewriteRule .* - [F] * RewirteEngine on : Rewirte Engine 을 켠다 * RewirteCond : RewriteCond에서 설정한 패턴과 일치하는 경우에 다음에 오는 RewriteRule들을 실행한다. 해당 내용은 REQUEST METHOD 가 DELETE|TRACE|OPTIONS|PATCH|HEAD일 경우 다음 룰을 적용한다. * RewirteRule : 적용할 룰, 여기서는 해당 메소.. 2021. 10. 21.
[React] useEffect, useRef useEffect 페이지가 렌더링 될 때마다 불리는 함수 useRef와 일반 변수의 차이 1 2 const countRef = useRef(0) let countVar = 0; cs countRef+1 할 경우 페이지가 unmount 되기 전까지 증가된 값이 남아있다. countVar+1 할 경우 페이지가 재 렌더링 될 경우 값이 초기화된다. useRef 잘못된 사용법 1 2 3 4 5 6 7 const App = () => { const [renderCnt, setRenderCnt] = useState(0); useEffect(() => { setRenderCnt(renderCnt+1); }); } Colored by Color Scripter cs 이렇게 사용할 경우 페이지가 렌더링 되면 render.. 2021. 7. 13.