찾다
웹 프론트엔드CSS 튜토리얼CSS 다중 행 및 다중 열 뉴스 모드_경험 교환

CSS 다중 행 및 다중 열 뉴스 모드_경험 교환

사진을 보세요:
CSS 다중 행 및 다중 열 뉴스 모드_경험 교환

이 효과는 심지어 세 개의 열과 four 칼럼 뉴스 모듈의 경우 CSS보다 더 편리하다고 생각하여 table을 사용했습니다. ul을 사용하는 것이 더 편리하고 제어하기 쉽다는 것을 깨닫게 된 것은 float입니다. 코드 첫 번째:

인용:

.news{} 
.news li{ list-style:none; clear:both} 
.news li a#n1{ text-decoration:none; float:left; line-height:22px;} 
.news li a#n2{ text-decoration:none; float:right; color:#999} 
.news li a#n3{ float:right; padding-right:20px;color:#999} 
.news li a#n1:hover{ text-decoration:underline;} 
.news li a#n3:hover,.news li a#n3:hover{ text-decoration:none;}

a#n1은 뉴스 제목이고 왼쪽에 떠 있으며 n2와 n3입니다. 20px 간격으로 오른쪽에 떠 있는 클릭 수와 출시 날짜입니다.
이 테스트는 ie6, ie7, ff, Opera를 지원합니다.
예, 3개의 열:

예, 2개의 열:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>css多行多列的新闻模式</title> 
<style type="text/css"> 
<!-- 
*{margin: 0px; padding:0px;} 
body { font-family:"宋体"; font-size:12px; color:#000; padding:100px;} 
.news{} 
.news li{ list-style:none; clear:both} 
.news li a#n1{ text-decoration:none; float:left; line-height:22px;} 
.news li a#n2{ text-decoration:none; float:right; color:#999} 
.news li a#n3{ float:right; padding-right:20px;color:#999} 
.news li a#n1:hover{ text-decoration:underline;} 
.news li a#n3:hover,.news li a#n3:hover{ text-decoration:none;} 
/**/ 
--> 
</style></head> 
<body> 
这是三列 
<ul class="news"> 
<li>左列,新闻标题项点 击发布日期</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线88882008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线88882008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线88882008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线88882008-08-08</li> 
</ul> 
</body> 
</html>


예, 점선:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>css多行多列的新闻模式</title> 
<style type="text/css"> 
<!-- 
*{margin: 0px; padding:0px;} 
body { font-family:"宋体"; font-size:12px; color:#000; padding:100px;} 
.news{} 
.news li{ list-style:none; clear:both} 
.news li a#n1{ text-decoration:none; float:left; line-height:22px;} 
.news li a#n2{ text-decoration:none; float:right; color:#999} 
.news li a#n3{ float:right; padding-right:20px;color:#999} 
.news li a#n1:hover{ text-decoration:underline;} 
.news li a#n3:hover,.news li a#n3:hover{ text-decoration:none;} 
--> 
</style></head> 
<body> 
这是二列 
<ul class="news"> 
<li>左列,新闻标题项点击次数</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
</ul> 
</body> 
</html>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>css多行多列的新闻模式</title> 
<style type="text/css"> 
<!-- 
*{margin: 0px; padding:0px;} 
body { font-family:"宋体"; font-size:12px; color:#000; padding:100px;} 
.news2{} 
.news2 li{ list-style:none;clear:both;margin-top:10px;border-bottom:1px dashed #ccc;height:16px; 
display:block} 
.news2 li a#n1{ text-decoration:none;float:left;} 
.news2 li a#n2{ text-decoration:none; float:right; color:#999;display:block} 
.news2 li a#n3{ float:right; padding-right:20px;color:#999; display:block} 
.news2 li a#n1:hover{ text-decoration:underline;} 
.news2 li a#n3:hover,.news li a#n3:hover{ text-decoration:none;}  
/**/ 
--> 
</style></head> 
<body> 
加条虚线 
<ul class="news2"> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
</ul> 
</body> 
</html>
예, 다양한 배경색:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>css多行多列的新闻模式</title> 
<style type="text/css"> 
<!-- 
*{margin: 0px; padding:0px;} 
body { font-family:"宋体"; font-size:12px; color:#000; padding:100px;} 
.news{} 
.news3{ background:#ccc;} 
.news3 li{ list-style:none; clear:both; height:20px; padding-top:8px;} 
.news3 li#x1{ list-style:none; clear:both; height:20px; background-color:#F2F2F2} 
.news3 li a#n1{ text-decoration:none; float:left;} 
.news3 li a#n2{ text-decoration:none; float:right; color:#999} 
.news3 li a#n3{ float:right; padding-right:20px;color:#999} 
.news3 li a#n1:hover{ text-decoration:underline;} 
.news3 li a#n3:hover,.news li a#n3:hover{ text-decoration:none;} 
--> 
</style></head> 
<body> 
不同背景色 
<ul class="news3"> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li id="x1">>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
</ul> 
</body> 
</html>
예, 테두리:



위 내용은 CSS multi- 행 및 다열 뉴스 모드_경험 교환. 더 많은 관련 내용을 보려면 PHP 중국어 웹사이트(www.php.cn)를 주목하세요!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>css多行多列的新闻模式</title> 
<style type="text/css"> 
<!-- 
*{margin: 0px; padding:0px;} 
body { font-family:"宋体"; font-size:12px; color:#000; padding:100px;} 
.news4{} 
.news4 li{ list-style:none; clear:both;margin-top:10px; padding:10px; border:1px solid #ccc;  
display:block} 
.news4 li a#n1{ text-decoration:none;float:left;} 
.news4 li a#n2{ text-decoration:none; float:right; color:#999;display:block} 
.news4 li a#n3{ float:right; padding-right:20px;color:#999; display:block} 
.news4 li a#n1:hover{ text-decoration:underline;} 
.news4 li a#n3:hover,.news li a#n3:hover{ text-decoration:none;} 
/**/ 
--> 
</style></head> 
<body> 
边框 
<ul class="news4"> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
<li>>> 热烈祝贺weilaixu.cn隆重上线2008-08-08</li> 
</ul> 
</body> 
</html>

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
마우스 움직임을 시뮬레이션합니다마우스 움직임을 시뮬레이션합니다Apr 22, 2025 am 11:45 AM

라이브 토크 나 수업 중에 대화식 애니메이션을 표시해야한다면 슬라이드와 상호 작용하기가 항상 쉽지 않다는 것을 알 수 있습니다.

Astro Actions 및 Fuse.js로 검색을 전원합니다Astro Actions 및 Fuse.js로 검색을 전원합니다Apr 22, 2025 am 11:41 AM

Astro를 사용하면 빌드 중에 대부분의 사이트를 생성 할 수 있지만 Fuse.js와 같은 것을 사용하여 검색 기능을 처리 할 수있는 작은 서버 측 코드가 있습니다. 이 데모에서는 퓨즈를 사용하여 개인 "북마크"세트를 검색합니다.

정의되지 않은 : 세 번째 부울 가치정의되지 않은 : 세 번째 부울 가치Apr 22, 2025 am 11:38 AM

문서가 저장되는 동안 Google 문서에서 볼 수있는 것과 유사한 프로젝트 중 하나에서 알림 메시지를 구현하고 싶었습니다. 다시 말해, a

제 3의 진술의 방어에서제 3의 진술의 방어에서Apr 22, 2025 am 11:25 AM

몇 달 전에 나는 해커 뉴스를 썼고 (하나와 마찬가지로) IF 문을 사용하지 않는 것에 대한 (현재 삭제 된) 기사를 가로 질러 달렸습니다. 이 아이디어를 처음 접한다면 (나처럼

다국어 번역에 웹 스피치 API 사용다국어 번역에 웹 스피치 API 사용Apr 22, 2025 am 11:23 AM

공상 과학 소설의 초기부터 우리는 우리와 대화하는 기계에 대해 환상을 가지고 있습니다. 오늘은 평범합니다. 그럼에도 불구하고 제작 기술

Jetpack Gutenberg 블록Jetpack Gutenberg 블록Apr 22, 2025 am 11:20 AM

Gutenberg가 핵심으로 풀려 났을 때를 기억합니다. 왜냐하면 나는 그날 WordCamp에 있었기 때문입니다. 지금은 몇 달이 지났으므로 점점 더 많은 것을 상상합니다.

VUE에서 재사용 가능한 페이지 매김 구성 요소 생성VUE에서 재사용 가능한 페이지 매김 구성 요소 생성Apr 22, 2025 am 11:17 AM

대부분의 웹 애플리케이션의 배후에있는 아이디어는 데이터베이스에서 데이터를 가져 와서 최상의 방법으로 사용자에게 제시하는 것입니다. 우리가 거기에서 데이터를 다룰 때

'Box Shadows'와 Clip-Path를 함께 사용합니다'Box Shadows'와 Clip-Path를 함께 사용합니다Apr 22, 2025 am 11:13 AM

#039;는 당신이 의미있는 것처럼 보일 수있는 상황에 대한 약간의 단계를 수행하자. 이것에서

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

mPDF

mPDF

mPDF는 UTF-8로 인코딩된 HTML에서 PDF 파일을 생성할 수 있는 PHP 라이브러리입니다. 원저자인 Ian Back은 자신의 웹 사이트에서 "즉시" PDF 파일을 출력하고 다양한 언어를 처리하기 위해 mPDF를 작성했습니다. HTML2FPDF와 같은 원본 스크립트보다 유니코드 글꼴을 사용할 때 속도가 느리고 더 큰 파일을 생성하지만 CSS 스타일 등을 지원하고 많은 개선 사항이 있습니다. RTL(아랍어, 히브리어), CJK(중국어, 일본어, 한국어)를 포함한 거의 모든 언어를 지원합니다. 중첩된 블록 수준 요소(예: P, DIV)를 지원합니다.

SublimeText3 영어 버전

SublimeText3 영어 버전

권장 사항: Win 버전, 코드 프롬프트 지원!

WebStorm Mac 버전

WebStorm Mac 버전

유용한 JavaScript 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전