inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

css position absolute설정 시 space-between이 실행되지 않습니다.

미해결

css body { height: 97vh; display: flex; justify-content: center; align-items: center; background-color: #f3f3f5; } .sedow { box-shadow: 0 0px 20px 5px rgba(128, 128, 128, 0.1); } .insedow { color: rgba(128, 128, 128, 0.7); } .white-color { color: #ffffff; } .font-weight-lg { font-weight: 600; } .screen-first { height: 170mm; width: 90mm; background-color: #ffffff; margin: 50px; border-radius: 40px; position: relative; } .screen-second { height: 170mm; width: 90mm; background-color: wheat; margin: 50px; border-radius: 40px; } .screen-first-icon_box { display: flex; justify-content: space-between; margin: 50px 25px 0; } .screen-first_profile_box { display: flex; justify-content: center; margin-top: 30px; } .screen-first_profile { height: 80px; width: 80px; background-color: orange; border-radius: 50%; box-shadow: 0 0px 15px 10px rgba(255, 180, 40, 0.3); } .screen-first_profile_name { text-align: center; font-size: x-large; font-weight: 750; margin-top: 40px; } .screen-first_profile_genre { text-align: center; font-weight: 600; color: rgba(128, 128, 128, 0.7); margin-top: 15px; } .screen-first_button-box { margin-top: 35px; display: flex; justify-content: center; } .screen-first_button-box_button1 { padding: 12px 32px; border-radius: 30px; background-color: black; color: #ffffff; margin-right: 5px; } .screen-first_button-box_button2 { padding: 12px 20px; border-radius: 30px; background-color: #ffffff; color: rgba(128, 128, 128, 0.7); margin-left: 5px; font-weight: 550; } .fa-heart { color: black; } .screen-first_song-list { justify-content: center; align-items: center; flex-direction: column; margin-top: 20px; margin-left: 15px; margin-right: 15px; } .screen-first_song-list_profile { display: flex; align-items: center; padding: 15px 25px; position: relative; border-radius: 20px; } .screen-first_song-list_profile_img { display: flex; align-items: center; justify-content: center; height: 45px; width: 45px; background-color: tomato; border-radius: 10px; } .screen-first_song-list_profile_text { margin-left: 15px; } .fa-ellipsis-vertical { color: rgba(128, 128, 128, 0.7); position: absolute; right: 20px; } .screen-first_song-list_profile_text_title { margin-bottom: 5px; font-size: small; } .fa-chart-simple { color: #ffffff; } .screen-first_music-player { display: flex; justify-content: space-between; align-items: center; position: absolute; bottom: 5px; } .screen-first_music-player { background-color: #222222; padding: 15px 30px; margin: 10px 15px; border-radius: 50px; } .screen-first_music-player_text_singer { margin-bottom: 7px; } .fa-pause { margin: 0 20px; } 추가로 reset.css 2.0도 적용하여 사용하고 있습니다. /* 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; } html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet" href="css/style.css" /> <script src="https://kit.fontawesome.com/3373615a5c.js" crossorigin="anonymous" ></script> </head> <body> <div class="screen-first"> <div class="screen-first-icon_box"> <i class="fa-solid fa-arrow-left fa-lg"></i> <i class="fa-solid fa-magnifying-glass fa-lg"></i> </div> <div class="screen-first_profile_box"> <div class="screen-first_profile"></div> </div> <h1 class="screen-first_profile_name">Tyler, The Creator</h1> <h4 class="screen-first_profile_genre">Rap, Hip-Hop</h4> <div class="screen-first_button-box"> <div class="screen-first_button-box_button1">Shuffle</div> <div class="screen-first_button-box_button2 sedow"> <i class="fa-solid fa-heart fa-lg"></i> 212 971 </div> </div> <ul class="screen-first_song-list"> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile sedow"> <div class="screen-first_song-list_profile_img"> <i class="fa-solid fa-chart-simple fa-xl"></i> </div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> </ul> <div class="screen-first_music-player"> <div class="screen-first_music-player_text"> <div class="screen-first_music-player_text_singer insedow"> Tyler, The Creartor </div> <div class="screen-first_music-player_text_title white-color font-weight-lg" > NOVEMBER </div> </div> <div> <i class="fa-solid fa-backward-step fa-lg white-color"></i> <i class="fa-solid fa-pause fa-2xl white-color"></i> <i class="fa-solid fa-forward-step fa-lg white-color"></i> </div> </div> </div> <!-- <div class="screen-second"></div> --> </body> </html> 이상하게 position absolute시에만 space-between이 작동하지 않습니다. 아무리 고민해보아도 원인을 파악할 수 없어 질문드립니다. ㅜㅜ

  • css
  • html
  • position
  • absolute
  • space-between
  • 코린이
  • 제발
  • 도와주세요
  • web
  • site
zkazkzl 댓글 1 좋아요 1 조회수 634

이 강의 수강 도중 오류가 발생했어요!

해결됨

따라하며 배우는 리액트 A-Z[19버전 반영]

파란색 선으로 표시한 부분의 코드를 치니까 에러 때문에 막혀서 진행을 전혀 못하고 있습니다. 구글링 해봤는데도 해결이 안 되네요. 친구가 로더 문제 같다고 해서 바벨을 지우고 재설치해봤지만 변화가 없었습니다. 혹시 해결 방법을 제시해주실 수 있을까요?.. ㅠㅠ

  • 제발
  • 도와주세요
  • typescript
  • tdd
  • react
  • redux
  • Next.js
proyong 댓글 1 좋아요 0 조회수 283

다음뉴스 댓글 크롤링 도움 부탁 드립니다. On/Off 버튼 클릭이 안되어요 ㅠ

미해결

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 잔재미코딩님의 셀레니움&스크래피 강좌를 듣고 있는데, 해당 게시물에 질문이 안되네요..?ㅠ 오래되서 그런가,, 그래서 전체 게시물에 질문 한 번 드려봅니다. 강좌는 이미 펼쳐져있는 댓글 창에서 '더보기'를 누르고 추가적으로 크롤링을 하는 코드를 알려주었는데요, 이후에 다음에서 On/Off버튼이 생겨 댓글이 기본적으로 닫혀있어서 아래 크롤링을 수행하려면 On/Off 버튼도 한 번 눌러줘야 하는 상황입니다. 도움 주실 수 있으신 분 있으시다면,, 한 번만 부탁 드리겠습니다. 안녕하세요? 기존 강좌 제작 시점과 달리 댓글은 기본적으로 닫혀 있고 on/off 버튼을 눌러야 댓글이 보이게 됩니다. 강의 활용해서 on_button 변수를 만들고, 이를 클릭할 수 있도록 한 번 꾸며 봤는데요, 태그도 바꿔보고, 함수도 바꿔보고, 다양한 방법으로 시도를 해봤는데, On/Off 버튼을 누르는 것을 못합니다 ㅠ 태그도 div.cmt_count_box까지만 해보고, button까지도 해보고, span까지도 해보고, 다양한 방법으로 시도 해봤습니다. on_button = driver.find_element_by_css_selector('alex-area > div > div > div > div.cmt_count_box > button') webdriver.ActionChains(driver).click(on_button).perform() 아무래도 눈으로 보고 직접 체득해야 실력이 Up되지 않을까 해서 강의만 보고 넘어가기 보다는, 한 번 직접 구현해보고 싶어 문의 드리고자 합니다. 기초 강의 때에는 조금씩 페이지가 바뀌는 부분도 쉽게 해결이 되었는데, 나름 중급이라 조금 어렵네요 ㅎㅎ 도움 부탁 드려 보겠습니다! [작성코드] from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException import time chromedriver = '/usr/local/chromedriver' driver = webdriver.Chrome(chromedriver) driver.get('https://news.v.daum.net/v/20190709165157301?d=y') #댓글창 On/Off 버튼 누르기 - 게속 안됨 ㅠ element = WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.CSS_SELECTOR, 'alex-area > div > div > div > div.cmt_count_box > button'))) on_button = driver.find_element_by_css_selector('alex-area > div > div > div > div.cmt_count_box > button') webdriver.ActionChains(driver).click(on_button).perform() #더보기 누르기 로직 만들기 loop, count = True, 0 while loop and count < 10: try: element = WebDriverWait(driver, 5).until( EC.presence_of_element_located((By.CSS_SELECTOR, 'alex-area > div > div > div > div.cmt_box > div.alex_more > button')) ) more_button = driver.find_element_by_css_selector('alex-area > div > div > div > div.cmt_box > div.alex_more > button') webdriver.ActionChains(driver).click(more_button).perform() count = count + 1 #count += 1로도 가능 time.sleep(2.0) except TimeoutException : loop = False #크롤링하기 comment_box = driver.find_element_by_css_selector('alex-area > div > div > div > div.cmt_box > ul.list_comment') comment_list = comment_box.find_elements_by_tag_name('li') #각각 댓글은 li가 감싸고 있음 for num, comment_item in enumerate(comment_list) : print("[",+str(num+1),+"]", comment_item.find_element_by_css_selector('div p').text) driver.quit() #alex-area > div > div > div > div.cmt_count_box > button > span <- on/off #alex-area > div > div > div > div.cmt_box > div.alex_more > button > span:nth-child(1) <- 더보기버튼 #alex-area > div > div > div > div.cmt_box > ul.list_comment <- 댓글리스트

  • 잔재미코딩
  • 크롤링
  • 파이썬
  • 제발
  • 다음뉴스
allrounder 댓글 1 좋아요 0 조회수 370

도와주세요

미해결

[하루 10분|Web Project] HTML/JS/CSS로 나만의 심리테스트 사이트 만들기

처음 시작하려고 할때 깃허브에 어떤 폴더를 어떻게 다운 받아야하나요? start 폴더도 없고 toyproject 폴더도 없는데 어찌 해야하는건지 .. 아무튼 뭐를 다운 받긴 받았는데 제대로 뜨지도 않아요 코딩 할때도 제대로 안나오고

  • 제발
  • bootstrap
  • HTML/CSS
  • javascript
최민준 댓글 2 좋아요 1 조회수 294

인기 태그

인프런 TOP Writers

주간 인기글