http://rwdb.kr/ratio_calc/

 

반응형웹, CSS만으로 background-image 의 종횡비 유지하기

RWDB Responsive Web Design dB Web awards, 우수 하이브리드웹·반응형웹 모음 사이트

rwdb.kr

width:1000px; height:300px; 을 기준으로 하며, 종횡비를 유지해야하는 컨텐츠

.background {
	width : 100 %;
	height : 0;
	padding-top : calc (300 / 1000 * 100 %); / * calc (이미지 높이 ÷ 이미지 가로 × 100 %) * /
	background : url (bg.jpg) center center / cover no-repeat;
}

padding-top 또는 padding-bottom 의 값은 “이미지 높이 ÷ 이미지 가로 × 100″

반응형

checkbox

html

<form>
  <fieldset>
    
    <legend>
      <h3>What type of accessibilty issues do you see most often?</h3>
    </legend>

    <div class="wrapper">
      <input id="a11y-issue-1" name="a11y-issues" type="checkbox" value="no-issues">
      <label for="a11y-issue-1">There are no issues.</label>
    </div>

    <div class="wrapper">
      <input id="a11y-issue-2" name="a11y-issues" type="checkbox" value="no-focus-styles">
      <label for="a11y-issue-2">Focus styles are not present.</label>
    </div>

    <div class="wrapper">
      <input id="a11y-issue-3" name="a11y-issues" type="checkbox" value="html-markup">
      <label for="a11y-issue-3">HTML markup is used in a bizarre way. Also, what happens if the label text is very looooooooong, like this one?</label>
    </div>
    
  </fieldset>
</form>

css

html {
  box-sizing: border-box;
  background: #f2f2f2;
  padding: 20px 50px
}

/* Inherit box-sizing to make it easier to change the property
 * for components that leverage other behavior.*/
*,
*::before,
*::after {
  box-sizing: inherit;
}

/*style form to limit width and highlight the long label*/
form {
    margin: 1rem auto;
    max-width: 750px;
}

/*style wrapper to give some space*/
.wrapper {
    position: relative;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

/*style label to give some more space*/
.wrapper label {
    display: block;
    padding: 12px 0 12px 48px;
}

/*style and hide original checkbox*/
.wrapper input {
  height: 40px;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 40px;
}

/*position new box*/
.wrapper input + label::before {
  border: 2px solid;
  content: "";
  height: 40px;
  left: 0;
  position: absolute;
  top: 0;
  width: 40px;
}

/*create check symbol with pseudo element*/
.wrapper input + label::after {
  content: "";
  border: 4px solid;
  border-left: 0;
  border-top: 0;
  height: 20px;
  left: 14px;
  opacity: 0;
  position: absolute;
  top: 6px;
  transform: rotate(45deg);
  transition: opacity 0.2s ease-in-out;
  width: 12px;
}

/*reveal check for 'on' state*/
.wrapper input:checked + label::after {
  opacity: 1;
}

/*focus styles—commented out for the tutorial, but you’ll need to add them for proper use
.wrapper input:focus + label::before {
  box-shadow: 0 0 0 3px #ffbf47;  
  outline: 3px solid transparent;
}*/

https://codepen.io/tutsplus/pen/rqrpqw

 

Custom Accessible Checkboxes: Pseudo Element Check

Taken from [How to Make Custom Accessible Checkboxes and Radio Buttons](http://webdesign.tutsplus.com/tutorials/how-to-make-custom-accessible-checkboxe...

codepen.io

 

Custom Radio Button Styles

<form>
  <fieldset>
    
    <legend>
      <h3>What type of accessibilty issues do you see most often?</h3>
    </legend>

    <div class="wrapper">
      <input id="a11y-issue-1" name="a11y-issues" type="radio" value="no-issues">
      <label for="a11y-issue-1">There are no issues</label>
    </div>

    <div class="wrapper">
      <input id="a11y-issue-2" name="a11y-issues" type="radio" value="no-focus-styles">
      <label for="a11y-issue-2">Focus styles are not present</label>
    </div>

    <div class="wrapper">
      <input id="a11y-issue-3" name="a11y-issues" type="radio" value="html-markup">
      <label for="a11y-issue-3">HTML markup is used in bizarre way. Also, what happens if the label text is very looooooooong, like this one?</label>
    </div>
    
  </fieldset>
</form>
html {
  box-sizing: border-box;
  background: #f2f2f2;
  padding: 20px 50px
}

/* Inherit box-sizing to make it easier to change the property
 * for components that leverage other behavior.*/
*,
*::before,
*::after {
  box-sizing: inherit;
}

/*style form to limit width and highlight the long label*/
form {
    margin: 1rem auto;
    max-width: 750px;
}

/*style wrapper to give some space*/
.wrapper {
    position: relative;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

/*style label to give some more space*/
.wrapper label {
    display: block;
    padding: 12px 0 12px 48px;
}

/*style and hide original checkbox*/
.wrapper input {
  height: 40px;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 40px;
}

/*position new box*/
.wrapper input + label::before {
  border: 2px solid;
  content: "";
  height: 40px;
  left: 0;
  position: absolute;
  top: 0;
  width: 40px;
  border-radius: 50%;
}

/*radio pseudo element styles*/
.wrapper input + label::after {
  content: "";
  opacity: 0;
  border: 10px solid;
  border-radius: 50%;
  position: absolute;
  left: 10px;
  top: 10px;
  transition: opacity 0.2s ease-in-out;
}

/*reveal check for 'on' state*/
.wrapper input:checked + label::after {
  opacity: 1;
}

/*focus styles*/
.wrapper input:focus + label::before {
  box-shadow: 0 0 0 3px #ffbf47;  
  outline: 3px solid transparent; /* For Windows high contrast mode. */
}

https://codepen.io/tutsplus/pen/XxBqwz

 

Custom Accessible Radio Buttons: Pseudo Element as Check

Taken from [How to Make Custom Accessible Checkboxes and Radio Buttons](http://webdesign.tutsplus.com/tutorials/how-to-make-custom-accessible-checkboxe...

codepen.io

 

https://webdesign.tutsplus.com/tutorials/how-to-make-custom-accessible-checkboxes-and-radio-buttons--cms-32074

 

 

How to Make Custom Accessible Checkboxes and Radio Buttons

Form elements like checkboxes and radio buttons look different depending on the user’s browser and operating system. For this reason designers and developers have long been styling their own...

webdesign.tutsplus.com

https://codepen.io/mpeace/pen/EKZqJP

 

Custom Checkboxes and Radio Buttons - Accessibility

Visually replace default system checkboxes and radio buttons with custom versions to allow for design consistency across browsers and platforms. - D...

codepen.io

https://m.blog.naver.com/PostView.nhn?blogId=qkrchgml4&logNo=220869883245&proxyReferer=https%3A%2F%2Fwww.google.com%2F

 

[Html/CSS] CSS를 이용하여 Tab menu 만들기

Tab menu를 만들기 위해서 구글링을 해본 결과 구글링은 없는 게 없다!! 찾아보니 만드는 방법은 여러 가...

blog.naver.com

https://www.w3.org/TR/2016/WD-wai-aria-practices-1.1-20160317/examples/radio/radio.html

 

ARIA Radio Group and Radio Example

Pizza Crust Regular crust Deep dish Thin crust

www.w3.org

https://www.w3.org/TR/2016/WD-wai-aria-practices-1.1-20160317/examples/radio/js/radio.js

 

반응형

https://tldrdevnotes.com/css-sass/vh-full-height-mobile-phones/

 

TLDR Dev Notes

100vh does not take into account the browser bar or the navigation menu. On iOS Safari and Google Chrome, the viewport will not resize in response to the URL being shown or hidden. This is a compromise by design, to avoid page jarring, reflows and relayout

tldrdevnotes.com

 

 

반응형

사이드바 토글메뉴 예제

 

html

<html>
<head>
	<title></title>
	<link href="https://fonts.googleapis.com/css?family=Quattrocento" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    
</head>
<body>
	<div id="menu-icon">
		<div id="hamburger"></div>
	</div>
	<div id="sidebar">
		
		<nav>
			<ul>
				<li>Home</li>
				<li>About Us</li>
				<li>Gallery</li>
				<li>Work</li>
				<li>Contact</li>
			</ul>
		</nav>
	</div>
	<script type="text/javascript" src="js/main.js"> </script>
</body>
</html>

css

* {
	margin: 0px;
	padding: 0px;
}
body {
	background-color: #FAFAFA;
	color: #22313F;
	font-family: 'Quattrocento', serif;
}

#menu-icon {
	position: fixed;
	right: 60px;
	top: 40px;
	height: 50px;
	width: 60px;
}
#menu-icon:hover {
	cursor: pointer;
}
#menu-icon #hamburger {
	position:absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	height: 4px;
	width: 50px;
	background-color: #22313F;
	transition: all .3s;
}
#menu-icon #hamburger:before {
	position:absolute;
	content: '';
	height: 4px;
	width: 40px;
	top: -10px;
	background-color: #22313F;
	transition: all .4s;
}
#menu-icon #hamburger:after {
	position:absolute;
	content: '';
	height: 4px;
	width: 40px;
	top: 10px;
	background-color: #22313F;
	transition: all .3s;
}
#menu-icon:hover #hamburger::after,#menu-icon:hover #hamburger::before {
	width: 50px;
}
#menu-icon:hover #hamburger{
	width: 40px;
}

#menu-icon #hamburger.active{
	background-color: rgba(0,0,0,0);
}
#menu-icon #hamburger.active:before{
	transform: rotate(45deg);
	top:0px;
	width: 40px;
}
#menu-icon #hamburger.active:after{
	transform: rotate(135deg);
	top:0px;
	width: 40px;
}

#sidebar {
	position:fixed;
	width: 300px;
	left: -300px;
	height: 100vh;
	background-color:#22313F;
	color:#FAFAFA;
	-webkit-clip-path: polygon(0% 0%, 100% 0%, 0% 100%, 0% 100%);
	transition: all .5s;
}
#sidebar nav ul {
	position: absolute;
	top: 50%;
	left: 50%;
	list-style:none;
	transform:translate(-50%, -50%);
	text-align:center;

}
#sidebar nav ul li {
	font-weight: 590;
	font-size: 1.1em;
	margin: 24px;
} 
#sidebar nav ul li:hover {
	cursor:pointer;
} 



#sidebar.show-sidebar {
	left: 0px;
	-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
	transition: all .5s;
}
/*
#sidebar.hide-sidebar {
	left: -300px;
	-webkit-clip-path: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%);
	transition: all .5s;
}

#sidebar.original-sidebar {
	position:fixed;
	width: 300px;
	left: -300px;
	height: 100vh;
	background-color:#22313F;
	color:#FAFAFA;
	-webkit-clip-path: polygon(0% 0%, 100% 0%, 0% 100%, 0% 100%);
	transition: all .5s;
}
*/

jquery

$(document).ready(function() {
	$("#menu-icon").click(function(){
			$("#hamburger").toggleClass('active');
			$("#sidebar").toggleClass('show-sidebar');
	});
});

https://codepen.io/anon/pen/PeWERy

 

sidebar

...

codepen.io

 

반응형

6

iPhone 11

/* 1792x828px at 326ppi */
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) { 
}

This media query is also for: iPhone XR


iPhone 11 Pro

/* 2436x1125px at 458ppi */ 
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { 
}

This media query is also for: iPhone X and iPhone Xs


iPhone 11 Pro Max

/* 2688x1242px at 458ppi */ 
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) { 
}

This media query is also for: iPhone Xs Max


Device orientation

To add landscape or portrait orientation, use the following code:

For portrait:

and (orientation : portrait)

For landscape:

and (orientation : landscape)

반응형

https://gist.github.com/needim/d15fdc2ac133d8078f7c

 

Device Specific CSS Media Queries Collection

Device Specific CSS Media Queries Collection. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

 

https://css-tricks.com/snippets/css/media-queries-for-standard-devices/

 

Media Queries for Standard Devices | CSS-Tricks

This page lists a ton of different devices and media queries that would specifically target that device. That's probably not generally a great practice, but it is helpful to know what the dimensions for all these devices are in a CSS context.

css-tricks.com

http://imagestory.net/?p=1645

 

여러기기의 중단점 – Media Queries for Standard Devices – Tarot's Design & Frontend Dev.

Media Queries for Standard Devices BY CHRIS COYIER LAST UPDATED ON JULY 23, 2016 Phones and Handhelds iPhones /* ———– iPhone 4 and 4S ———– */ /* Portrait and Landscape */ @media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-

imagestory.net

https://www.mydevice.io/#compare-devices

 

mydevice.io : web devices capabilities

Mobile devices, in Responsive Web Design, relate to a core value which is the value of CSS width or ("device-width"), in CSS Device Independant Pixels, which depends both of the browser and user zoom settings. Choose your weapon :

www.mydevice.io

https://blog.outsider.ne.kr/1153

 

JavaScript에 미디어쿼리를 사용하는 matchMedia() :: Outsider's Dev Story

요즘은 모바일과 데스크톱용 사이트를 따로 만드는 대신 웹사이트를 반응형으로 만들어서 다양한 해상도에 대응하는 것이 자연스럽다고 생각한다. 웹사이트를 반응형으로 만들려면 [CSS 미디어쿼리](https://deve...

blog.outsider.ne.kr

https://yesviz.com/

 

Screen sizes, viewport size and CSS media queries for Devices | Viz Devices by YesViz.com

 

yesviz.com

 

반응형

https://gxnzi.tistory.com/94

 

Chrome 브라우저에서 Ajax 테스트

서버에 올리지 않은 로컬의 HTML 파일에서 크롬을 통해 Ajax 테스트를 하는 경우 Access to XMLHttpRequest at 'file:///xxxxxx' from origin 'null' has been blocked by CORS policy: Cross origin requests are..

gxnzi.tistory.com

http://jinolog.com/programming/javascript/2011/03/21/jquery-ready-function.html

 

window.onload를 대체하는 jquery의 ready 함수 - Jinolog

2011.03.21 00:41 window.onload를 대체하는 jquery의 ready 함수 window.onload 함수는 웹페이지의 로딩이 끝나는 시점에 실행되는 함수다 window.onload = function () { alert("로딩 완료"); } 와 같이 사용하게 되면 페이지 로드가 끝난 후에 "로딩 완료" 라는 얼럿창이 뜨게 된다 하지만 onload에는 몇가지 단점이 있는데, 이 함수는 페이지 안의 이미지나 외부 파일이 로드 될때까지도

jinolog.com

 

https://codediver.tistory.com/33

 

[JavaScript] 동적 로딩

Dynamic Script Loading 동적으로 자바스크립트를 로딩하는 방법 중 하나는 script 태그를 자바스크립트 코드에서 직접 생성하는 것인데요. 다음과 같이 script 태그를 생성하고 src에 로딩할 주소를 넣음으로서..

codediver.tistory.com

https://developers.google.com/analytics/devguides/collection/analyticsjs/

 

Adding analytics.js to Your Site  |  Analytics for Web (analytics.js)  |  Google Developers

A JavaScript library that lets you measure how users interact with your website.

developers.google.com

https://gxnzi.tistory.com/94

 

Chrome 브라우저에서 Ajax 테스트

서버에 올리지 않은 로컬의 HTML 파일에서 크롬을 통해 Ajax 테스트를 하는 경우 Access to XMLHttpRequest at 'file:///xxxxxx' from origin 'null' has been blocked by CORS policy: Cross origin requests are..

gxnzi.tistory.com

 

반응형

https://codediver.tistory.com/33

 

[JavaScript] 동적 로딩

Dynamic Script Loading 동적으로 자바스크립트를 로딩하는 방법 중 하나는 script 태그를 자바스크립트 코드에서 직접 생성하는 것인데요. 다음과 같이 script 태그를 생성하고 src에 로딩할 주소를 넣음으로서..

codediver.tistory.com

 

반응형

iframe 태그 (비추천)

iframe을 통해 html을 import할 경우 문제점

  • XSS 공격에 취약합니다. 악의적인 스크립트를 가지고 있는 사이트를 띄울 수 있다고 합니다. 물론 이래저래 공격을 피하는 방법으로 여러가지 방법이 제시되어 있긴합니다
  • 외부 스타일 적용이 어렵습니다. 특히 height 값이 마음대로 조작되지 않는다고 합니다 (스크롤이 자동으로 생성됨) 제이쿼리로 해결하는 방법이 있다고는 하지만 매우 번거로운 것 같습니다
  • 웹 크롤링 문제. iframe으로 불러온 소스는 숨겨져 있어서 찾기가 어렵습니다. 
  • 접근성, 사용성 저하 문제. 프레임 구조의 문서는 제목을 프레임 셋 본체의 <title> 제목으로 보여주기 때문입니다. 검색 엔진에 등록시 프레임셋 뿐만 아니라 메뉴용, 콘텐츠용 페이지들까지 함께 크롤링이 되는데, 경로로 들어가면 프레임에 넣어서 표시하도록 만든 페이지만 뜨게됩니다.
  • frame으로 불러온 페이지의 데이터가 큰 경우 브라우저의 속도 저하가 우려

 

JS를 이용한 HTML include

 

 

  • <head>에 <script src="js/includeHTML.js"></script>를 넣어준다.
  • <body>에 <div include-html="navbar.html"></div>를 넣고 <script>includeHTML();</script>를 호출해준다. 여기서는 navbar를 관리하고 있다.
// includeHTML.js

function includeHTML() { 
	var z, i, elmnt, file, xhttp; 
	z = document.getElementsByTagName("*"); 
	for (i = 0; i < z.length; i++) { 
    	elmnt = z[i]; 
    	file = elmnt.getAttribute("include-html"); 
    	if (file) { xhttp = new XMLHttpRequest(); 
    		xhttp.onreadystatechange = function() { 
    			if (this.readyState == 4 && this.status == 200) { 
    				elmnt.innerHTML = this.responseText; elmnt.removeAttribute("include-html"); 
    				includeHTML();
				} 
			} 
        	xhttp.open("GET", file, true); xhttp.send(); return; 
		} 
	} 
}
 

html in html - html에서 html을 불러오자~

index.html 파일에 div의 id가 contents인 곳에 testContents.html 파일을 넣는다고 했을 때 쉽게 쓸수 있는 방법은 import와 Jquery load 가 쉬울 것 같다. 1. impot 를 사용한 방법 index.html <!DOCTYPE html>..

beableto.tistory.com

 

html in html - html에서 html을 불러오자~

index.html 파일에 div의 id가 contents인 곳에 testContents.html 파일을 넣는다고 했을 때 쉽게 쓸수 있는 방법은 import와 Jquery load 가 쉬울 것 같다. 1. impot 를 사용한 방법 index.html ..

beableto.tistory.com

 

https://doolyit.tistory.com/15

 

javascript / jQuery 개발시 PC, 모바일 접속유무 확인하기

웹사이트 개발시, PC환경에서 접속을 했는지 모바일에서 접속을 했는지 확인하기 위한 javascript 코드 입니다. navigator 객체의 platform 속성을 이용하여 확인을 하게 됩니다. 아래 링크는 navigator 객체의 P..

doolyit.tistory.com

 

https://www.html5rocks.com/ko/tutorials/webcomponents/imports/

 

HTML Imports: #include for the web - HTML5 Rocks

HTML Imports allows you to include HTML/CSS/JS in other HTML documents.

www.html5rocks.com

 

https://webclub.tistory.com/316

 

브라우저 호환성 대응 방안

Browser Compatibility - 브라우저 호환성 대응 방안 PC/모바일에서 사용하는 브라우저가 다양하고 각각의 레이아웃 엔진, Javascript 엔진이 다르고 지원하는 기능 범위도 차이가 있습니다. 부분적인 기능이지만..

webclub.tistory.com

http://blog.naver.com/PostView.nhn?blogId=jb7xx8r&logNo=220650589541

 

link rel=import 에 대한 설명

개요

blog.naver.com

 

 

반응형

'UXUI Development > Javascript' 카테고리의 다른 글

자바스크립트 async / await  (0) 2021.12.23
API 문서 자동화 도구  (0) 2021.12.14
javascript 동적로딩  (0) 2019.06.12
script 내에 script호출  (0) 2019.06.12
자바스크립트  (0) 2019.05.29
날짜 분기 스크립트  (0) 2019.05.29
iframe/ContentDocument 프로퍼티 (+삼항연산자)  (0) 2019.04.04
여러개의 스크롤이벤트 사용시  (0) 2019.03.19

https://webdir.tistory.com/481

 

스크롤을 감지하여 사이트의 헤더를 보이거나 숨기기

앞서 유사한 기능의 플러그인인 Headroom.js 에 대하여 살펴보았는데, 구형 IE에 대한 크로스브라우징에 어려움을 겪을 수 있습니다. 이에 원리는 유사하나 대상 요소가 명확하게 한정된 요소일때 간단히 구현할..

webdir.tistory.com

 

반응형

http://www.nextree.co.kr/p7363/

 

JavaScript : Scope 이해

JavaScript는 단순한 언어로 여겨져 왔습니다. 그래서 여러 개발자분들이 JavaScript를 배우기도 쉽고 간단히 쓸 수 있다는 편견을 가지고있습니다. 하지만, 최근 JavaScript의 관심이 늘어나면서 JavaScript는 더이상 '쉬운 언어'가 아닌 깊은 이해를 필요로 하는 언어라는 인식이 생기고있습니다. 저는 JavaScript에 대한 깊은 이해를 하기 위해서는 클로저(Closure)에 대해 알아야 되며 이를 알기 위해서는

www.nextree.co.kr

https://alnova2.tistory.com/967

 

[자바스크립트] Execution Context (실행 컨텍스트) 에 대하여

1. 실행 컨택스트 개념 자바스크립트가 실행될 떄에는 실행 단위인 실행 컨텍스트하에서 실행된다. 실행 가능한 자바스크립트 코드 블록이 실행되는 환경이라고 할 수 있다. 실행 컨텍스트(Execution Context)는 "..

alnova2.tistory.com

 

 

Chart 차트 라이브러리 (Chart.js)

Chart.js 

  • 무료/완전 오픈소스.
  • JS/HTML5/Canvas 기반.
  • 캔버스 기반이라 빅데이터 처리 애니메이션에 좋다.
  • 적당히 다양한 타입과 옵션.
  • 사용하기 매우 쉽다.
  • 필요한 모듈만 가져다 사용할 수 있음.
  • 반응형지원
  • vue.js wrapper : https://github.com/apertureless/vue-chartjs

https://www.chartjs.org/

 

Chart.js | Open source HTML5 Charts for your website

New in 2.0 New chart axis types Plot complex, sparse datasets on date time, logarithmic or even entirely custom scales with ease.

www.chartjs.org

 

Google Charts

https://developers.google.com/chart/interactive/docs/

 

Using Google Charts  |  Google Developers

Send feedback Using Google Charts Google Charts provides a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart gallery provides a large number of ready-to-use chart types. The most common way

developers.google.com



 

반응형

http://changpd.blogspot.com/2014/01/javascript-jquery-cron.html

 

[javascript] 특정시간에만 함수 실행

특정시간에만 팝업을 띄우려면?? 특정시간에만 로그인을 막으려면?? 특정시간에만 할일은 의외로 참 많다. 방법? 딱히 없다. 현재시간 구해서 시작시간, 종료시간 사이에 있을때 시작하는 수밖엔. if ((현재시간 > 시작시간) && ...

changpd.blogspot.com

https://mainia.tistory.com/2564

 

자바스크립트 날짜 계산하는 다양한 방법

자바스크립트 날짜 계산하는 다양한 방법 프로그램 언어에서 가장 자주 찾는 항목 중에 하나가 날짜 계산입니다. 데이터베이스 테이블 설계할 때 날짜는 항상 들어가고 꺼내서 가공할 때도 날짜를 기준으로 많이..

mainia.tistory.com

https://github.com/jinyowo/JS-Calendar/wiki/**-moment.js-(%EB%82%A0%EC%A7%9C%EA%B4%80%EB%A0%A8-%EC%9E%91%EC%97%85%EC%9D%84-%EC%9C%84%ED%95%9C-%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC)

 

jinyowo/JS-Calendar

2017 FEinternship, simple calendar with javascript - jinyowo/JS-Calendar

github.com

https://ggmouse.tistory.com/103

 

[JavaScript] 오늘 날짜 (년, 월, 일) 및 날짜 비교 new Date() NaN

오늘 날짜 정보를 가져와보자 1 2 3 4 5 6 7 8 9 10 11 12 13

 

반응형

https://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip/methods/append

 

append - API Reference - Kendo UI TabStrip | Kendo UI for jQuery

 

docs.telerik.com

 

반응형

'Librarys > Tabs' 카테고리의 다른 글

이중탭 구현  (0) 2021.12.09
탭(이중탭) 예제  (0) 2019.05.27

jQuery 사용하여 이중탭 구현

 

html

<div class="login">
  <!-- contents -->
  <div class="container">
    <div class="tit-box">
        <h2>로그인 폼</h2>
    </div>
  	<div class="tabonoff content-wrap">
      <!-- 탭메뉴 -->
      <ul id="tabMenu" class="jq_tab tab-menu">
        <li>
          <a href="javascript:void(0);" class="tit"><span>A 타입</span></a>
        </li>
        <li>
          <a href="javascript:void(0);" class="tit"><span>B 타입</span></a>
        </li>
      </ul>
      <!-- //탭메뉴 -->
      <div class="cont-wrap">
      <!-- 탭1_설치 -->
      <div class="tab-cont">
        <div class="tabonoff sub-tabs">
          <!-- dots_indicator -->
            <div class="dots">
              <a href="javascript:void(0);" class="on"></a>
              <a href="javascript:void(0);"></a>
              <a href="javascript:void(0);"></a>
            </div>
          <!-- //dots_indicator -->

        <!-- 서브_탭메뉴 -->
        <ul class="jq_tab jq_stabMenu stab-menu">
          <li class="active"><a href="javascript:void(0);" class="tit">ID/PW</a></li>
          <li><a href="javascript:void(0);" class="tit">로그인2</a></li>
          <li><a href="javascript:void(0);" class="tit">로그인3</a></li>
        </ul>
        <!-- //서브_탭메뉴 -->
      	<div class="cont-wrap cont-box">
            <!-- IDPW_탭1_1-->
            <div class="tab-cont">
                <div class="form-group">
                    <div class="input-box">
                        <div class="input">
                            <input type="text" title="아이디 입력" placeholder="아이디">
                        </div>
                        <div class="input">
                            <input type="password" title="패스워드 입력" placeholder="패스워드 입력">
                        </div>  
                    </div>
                  <div class="btn-wrap w100p">
                    <button class="id_loginCheck btn-sblue" type="button">로그인</button>
                  </div>
                  <div class="desc">
                    <p>※ 할당받은 ID를 입력하시면 로그인이 됩니다.</p>  
                  </div>
                </div>
            </div>
            <!-- //IDPW_탭1_1 -->
            <!-- 탭1_2 -->
            <div class="tab-cont">
              <div class="form-group">
              <div class="input-box pd">
                <div class="input">
                    <input type="text" title="사용자ID / 이메일" placeholder="사용자ID / 이메일">
                </div> 
                </div>
                <div class="btn-wrap">
                  <button class="id_register_fido btn-navy" type="button">등록</button>
                  <button class="id_loginCheck btn-sblue" type="button">로그인</button>
                  <button class="id_delete btn-gray" type="button">해지</button>
                </div>
                <div class="desc">
                    <p>※ 할당받은 ID를 입력하고 등록하시면 로그인이 됩니다.</p>  
                </div>
                </div>
            </div>
            <!-- //탭1_2 -->

        	<!-- 탭1_3 -->
        	<div class="tab-cont">
          		<div class="form-group">
                    <div class="input-box">
                        <div class="input">
                            <input type="text" title="아이디 입력" placeholder="아이디">
                        </div>
                      <div class="input">
                          <input type="password" title="패스워드 입력" placeholder="패스워드 입력">
                      </div>  
                    </div>
                    <div class="btn-wrap">
                      <button class="id_register_motp btn-navy" type="button">등록</button>
                      <button class="id_loginCheck btn-sblue" type="button" >로그인</button>
                      <button class="id_delete btn-gray" type="button">해지</button>
                    </div>
                	<div class="desc">
                    	<p>※ㅎㅎㅎ</p>  
                	</div>
                  </div>
                </div>
        		<!-- //탭1_3 -->
    			</div>
    		</div>
    	</div>
    	<!-- //탭1_설치 -->
    	<!-- 탭2_미설치 -->
    	<div class="tab-cont">
    		<div class="tabonoff sub-tabs">
              <!-- dots_indicator -->
              <div class="dots">
                <a data-dot="dot1" href="javascript:void(0);" class="on"></a>
                <a data-dot="dot2"  href="javascript:void(0);"></a>
                <a data-dot="dot3"   href="javascript:void(0);"></a>
              </div>
                <!-- //dots_indicator -->
                <!-- 서브_탭메뉴 -->
                <ul class="jq_tab jq_stabMenu stab-menu">
                  <li class="active"><a href="javascript:void(0);" class="tit">ID/PW</a></li>
                  <li><a href="javascript:void(0);" class="tit">FIDO2</a></li>
                  <li><a href="javascript:void(0);" class="tit">MOTP</a></li>
                </ul>
                <!-- //서브_탭메뉴 -->

                <div class="cont-wrap cont-box">
                    <!-- 탭2_1 -->
                    <div class="tab-cont">
                      <div class="form-group">
                        <div class="input-box">
                          <div class="input">
                              <input type="text" title="아이디 입력" placeholder="아이디">
                          </div>
                          <div class="input">
                              <input type="password" title="패스워드 입력" placeholder="패스워드 입력">
                          </div>  
                        </div>
                        <div class="btn-wrap w100p">
                            <button class="id_loginCheck btn-sblue" type="button">로그인</button>
                        </div>
                        <div class="desc">
                            <p>※ 할당받은 ID를 입력하시면 로그인이 됩니다.</p>  
                        </div>

                      </div>
                    </div>
                    <!-- //탭2_1 -->

                    <!-- 탭2_2-->
                    <div class="tab-cont">
                      <div class="form-group">
                        <div class="input-box pd">
                          <div class="input">
                              <input type="text" title="사용자ID / 이메일" placeholder="사용자ID / 이메일">
                          </div>
                        </div>
                        <div class="btn-wrap">
                          <button class="id_register_fido btn-navy" type="button" >등록</button>
                          <button class="id_loginCheck btn-sblue" type="button" >로그인</button>
                          <button class="id_delete btn-gray" type="button" >해지</button>
                        </div>
                        <div class="desc">
                          <p>※ sdd</p>  
                        </div>
                      </div>
                    </div>
                    <!-- //탭2_2 -->

      				<!-- 탭2_3 -->
      				<div class="tab-cont">
      					<div class="form-group">
                          <div class="input-box">
                            <div class="input">
                                <input type="text" title="아이디 입력" placeholder="아이디">
                            </div>
                            <div class="input">
                                <input type="password" title="패스워드 입력" placeholder="패스워드 입력">
                            </div>  
                          </div>
                          <div class="btn-wrap">
                            <button class="id_register_motp btn-navy" type="button" >등록</button>
                            <button class="id_loginCheck btn-sblue" type="button" >로그인</button>
                            <button class="id_delete btn-gray" type="button" >해지</button>
                          </div>
                          <div class="desc">
                            <p>※ aaaaa </p>  
                          </div>
      					</div>
    				</div>
    				<!-- //탭2_3 -->
  					</div>
  				</div>
  			</div>
  			<!-- //탭2_미설치 -->                 
  		</div>                      
  	</div>
  </div>
  <!-- //contents -->
</div>

 

script


$(document).ready(function(){
        
    // 이중탭
    $(".tabonoff > .cont-wrap").children().css("display", "none"); 
    $(".tabonoff > .cont-wrap div:first-child").css("display", "block");
    $(".tabonoff > .jq_tab li:first-child").addClass("on"); 

    $(".tabonoff").find(".jq_tab > li").on("click", function() { 
        var index = $(this).parent().children().index(this);
		
        $(this).siblings().removeClass();
        $(this).addClass("on");
       // console.log($(this).parent().children());
        $(this).parent().next(".cont-wrap").children().hide().eq(index).show();
    });

     // 설치/미설치 탭메뉴 이미지교체 
     $("#tabMenu > li").click(function(){
        var $this = $(this);
        $("#tabMenu > li").each(function(idx){
            var $li = $(this);
            $li.find("img").attr("src", $(this).find("img").attr("src").replace("_on","_off"));
        });
        $this.find("img").attr("src", $this.find("img").attr("src").replace("_off","_on"));
    });   

	// 서브_탭메뉴 > Dot Indicator 연결
	$(".jq_stabMenu li > a").on("click", function() {
		var index = $(this).parent().index();
		$(this).closest(".tabonoff").find(".dots > a").removeClass("on");
		$(this).closest(".tabonoff").find(".dots > a").eq(index).addClass("on");
	});
   
    //  Dot Indicator > 서브_탭메뉴 연결
    $(".dots > a").click(function(){
        var dotIndex = $(this).parent().children().index(this); 
        $(this).siblings().removeClass();
        $(this).addClass("on");
        // console.log(dotIndex); 
        $(this).closest(".tabonoff").find("li").eq(dotIndex).trigger("click");	
    });

    // '로그인'버튼 클릭이벤트
    $(".id_loginCheck").click(function(){
        location.href="./sub-main.html"
    });
    

});

 

css

.login .container{width:1280px; /*margin:0 auto;*/ margin-top:100px; margin-bottom:160px;}
.login .tit-box{margin-bottom:56px;}
.login .tit-box p{font-size:36px; color:#797979; margin-bottom:20px;}
.login .tit-box h2{font-size:60px; font-family:'NotoM';}

.login .content-wrap{display:block; clear:both;*zoom:1; width:1024px; margin:0 auto;}
.login .content-wrap:after{display:block; height:0;content:".";font-size:0;visibility:hidden;clear:both;}
.login .content-wrap .form-group{width:582px; margin:0 auto;}
.login .content-wrap>.tab-conts{display:block; float:left; width:100%;clear:both;color:#fff; width:1024px;}
.login .content-wrap .tab-menu{position:relative; width:440px; margin:0 auto; height:40px;}
.login .content-wrap .tab-menu::after{display:block; content:''; width:1px; height:36px; background:#b7b7b7; position:absolute; top:0; left:50%; transform:translateX(-50%);}
.login .content-wrap .tab-menu li::before{display:block; content:''; clear:both;}
.login .content-wrap .tab-menu li{float:left; width:45%; height:44px; font-size:30px; vertical-align:middle; font-family:'NotoM'; color:#a2a3a3;}
.login .content-wrap .tab-menu li:first-of-type{margin-right:5%;}
.login .content-wrap .tab-menu li:last-of-type{margin-left:5%;}
.login .content-wrap .tab-menu li.on{color:#2b2e38;}
.login .content-wrap .tab-menu li a{display:block; width:100%; text-align:center;}
.login .content-wrap .tab-menu li a img{vertical-align:middle;}
.login .content-wrap .tab-menu li:first-of-type a img{margin-right:15px;}
.login .content-wrap .tab-menu li:last-of-type a img{margin-left:20px;}
.login .content-wrap .tab-menu li a span{vertical-align:middle;}
.login .sub-tabs{display:block; clear:both; *zoom:1; padding:0 50px; /*margin-top:20px;*/ position:relative;}
.login .sub-tabs .stab-menu{width:800px; margin:0 auto; height:68px; padding:0 50px;}
.login .sub-tabs .stab-menu li::before{display:block; content:''; clear:both;}
.login .sub-tabs .stab-menu li{float:left; width:33.33%; height:66px;font-size:30px; color:#bec2c7; font-family:'NotoM';}
.login .sub-tabs .stab-menu li a{display:block; padding:20px 0;}
.login .sub-tabs .stab-menu li.on{color:#2b2e38; border-bottom:3px solid #2b2e38;}

.login .cont-box{position:relative; width:900px; margin:0 auto; border:1px solid #b7b7b7; height:420px;}

.login .form-group .btn-wrap{width:456px; margin:0 auto; margin-top:24px;}
.login .form-group .btn-wrap::after{display:block; content:''; clear:both;}
.login .form-group .btn-wrap button{width:148px; float:left;}
.login .form-group .btn-wrap button{color:#fff; font-size:26px; font-family:'NotoM'; padding:32px 0; line-height:1;}
.login .form-group .btn-wrap button + button{margin-left:6px;}
.login .form-group .btn-wrap.w100p{width:360px;}
.login .form-group .btn-wrap.w100p button{width:100%;}

.login .input-box{width:360px; margin:0 auto; margin-top:52px;}
.login .tab-cont .input-box.pd{padding:28px 0 10px 0;}

.login .input-box .input + .input{margin-top:14px;}
.login .input-box input{font-size:28px; /* padding:9px 12px;*/ width:100%; line-height:1; background:#fff; border-radius:0px; border:0; border-bottom:1px solid #cccccc; height:52px;}

.login .input-box input:focus, 
.login .input-box select:focus, 
.login .input-box select:focus{outline:1px solid transparent;}
.login .form-group .desc{font-size:20px; font-family:'NotoR'; color:#a1a2a4; margin-top:24px; line-height:1.1;}
.login .tab-cont{position:relative;}
.login .tab-cont .dots{width:100%; position:absolute; bottom:-40px; left:50%; transform:translateX(-50%);}
.login .tab-cont .dots a{display:inline-block; width:10px; height:10px; border-radius:50%; background:#c3cacf; transition:all .3s ease-in-out;}
.login .tab-cont .dots a.on{background:#428bf2;border-radius:50px; width:24px;}
.login .tab-cont .dots a + a{margin-left:12px;}
.login .content-wrap .tab-menu{margin-bottom:24px; margin-bottom:20px;}
.login .content-wrap .tab-menu{width:520px;}
.login .content-wrap .pt{padding-top:24px;}

 


 

이미지 탭

 

https://freemi99.tistory.com/entry/jQuery-%ED%83%AD%EB%A9%94%EB%89%B4-%EC%9D%B4%EB%AF%B8%EC%A7%80-%ED%83%AD%EB%A9%94%EB%89%B4-li-%EC%95%88%EC%97%90-div-%EA%B5%AC%EC%A1%B0%EB%A1%9C

 

jQuery 탭메뉴 - 이미지 탭메뉴 / li 안에 div 구조로

4. 탭메뉴 리스트 속에 컨텐즈 존재하게 !! li 안에 div 구조로 html 1번탭내용 2번탭내용 3번탭내용 4번탭내용 css ul,li{list-style:none} .tab{position:relative;overflow:hidden;height:500px} .tab li{float..

freemi99.tistory.com

 

http://www.blueb.co.kr/?c=1/4&cat=%ED%83%AD%EB%A9%94%EB%89%B4&uid=595

 

블루비 웹스토어 - 메뉴/네비게이션

 

www.blueb.co.kr

http://www.blueb.co.kr/?c=1/4&cat=%ED%83%AD%EB%A9%94%EB%89%B4&p=2&uid=502

 

블루비 웹스토어 - 메뉴/네비게이션

 

www.blueb.co.kr

https://jsbin.com/docaqeqoju/edit?html,js,output

 

JS Bin

Sample of the bin:

jsbin.com

 

반응형

'Librarys > Tabs' 카테고리의 다른 글

이중탭 구현  (0) 2021.12.09
이중탭 레퍼런스  (0) 2019.05.28

https://blog.uplus.co.kr/2675

 

나홀로여행 필수 어플 4가지

1인 가구가 늘면서 '나 홀로 소비'가 늘어나고, 여행시장에서도 혼자 여행을 떠나는 이른바 '혼여족'들의 영향력이 점점 커지고 있습니다. 인터파크투어가 지난해 해외 항공예약 데이터베이스를 분석했더니 1인..

blog.uplus.co.kr

https://m.post.naver.com/viewer/postView.nhn?volumeNo=10697899&memberNo=11046785

 

한국 관광 어플, ‘대홍수 시대’에서 살아남기

[BY 웹진 한류스토리] 글 윤지환 경희대학교 호텔관광학부 교수드라마로 시작한 한류 열풍은 한동안 ...

m.post.naver.com

http://www.gtn.co.kr/mobile/news_view.asp?news_seq=68973

 

세계여행 :: 여행업계 대표신문, 세계여행신문

 

www.gtn.co.kr

https://cmos00.tistory.com/1984

 

12. UI 스토리보드 작성과 UI 상세설계 가이드

1. 스토리보드(Storyboard)의 이해 - Storyboard란, UX구현에 수반되는 사용자와 목표, 인터페이스 간 상호작용을 시각화하여, 개발자/디자이너와의 의사소통을 돕는 도구이자, 완성해야 할 앱서비스와 예상되는..

cmos00.tistory.com

https://www.venturesquare.net/544639

 

스타트업과 앱 기획을 위한 UI Sketch Sheet

모바일 손 안의 컴퓨터로 인하여 모든 웹서비스는 모바일 앱 서비스로 바뀔 수 밖에 없는 시대를 살고 있습니다. 스타트업을 중심으로 앱 UI, 앱 서비스 기획이 활발히 이루어지고 있는데 반해 앱 UI와 스토리보드(화면정의, 화면흐름) 작성을 위한 최적의 양식이 부족한 듯 하여

www.venturesquare.net

http://durandot.blog.me/220053546939

 

스타트업과 앱 기획을 위한 Wireframe, Storyboard 작성

모바일 손 안의 컴퓨터로 인하여 모든 웹서비스는 모바일 앱 서비스로 바뀔 수 밖에 없는 시대를 살고 있습...

blog.naver.com

 

반응형

+ Recent posts