CSS의 float에 대한 최고의 이해

高洛峰
풀어 주다: 2017-02-22 13:09:17
원래의
1148명이 탐색했습니다.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<div style="border:3px solid silver; width:300px;">
    <div id="container" style="background-color: blue;">
        <div style="float:left; background-color: green;">above</div>
        <div id="DIV" style="margin:30px 0; background-color:gold;">content</div>
        <div style="float:right; background-color: green;">below</div>
    </div>
</div>
<hr>
<hr>
<div style="border:3px solid silver; width:300px;">
    <div id="container" style="background-color: blue;">
        <div style="position:absolute; background-color: green;">above</div>
        <div id="DIV" style="margin:30px 0; background-color:gold;">content</div>
        <div style="position:absolute; background-color: green;">below</div>
    </div>
</div>
<hr>
<hr>
<div style="border:3px solid silver; width:300px;">
    <div id="DIV1" style="margin-bottom:50px; background-color:gold;">above</div>
    <div id="Float" style="float:left; background-color: green; width:100%;">Float</div>
    <div id="DIV2" style="margin-top:50px; background-color:gold;">below</div>
</div>

</body>

</html>
로그인 후 복사

효과는 다음과 같습니다.

CSS의 float에 대한 최고의 이해

CSS에서 float에 대한 최고의 이해에 대한 더 많은 관련 기사를 보려면 PHP 중국어 웹사이트를 주목하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
최신 이슈
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!