본문 바로가기

Python_WEB/HTML

[Ch6]CSS3 레이아웃과 애니메이션 연습문제 3

반응형

Q>

상대 위치 설정(relative positioning)을 이용해 다음과 같은 수식을 표시해 보자.

 

A>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #sigma {
            position: relative;
            font-size: 50px;
            left: 50px;
            top: 50px;
        }

        #n {
            position: relative;
            font-weight: bold;
            font-size: 20px;
            left: 14px;
            top: 5px;
        }

        #i1 {
            position: relative;
            font-weight: bold;
            font-size: 20px;
            left: -3px;
            top: 85px;
        }

        #x {
            position: relative;
            font-weight: bold;
            font-size: 25px;
            left: -3px;
            top: 50px;
        }

        #i2 {
            position: relative;
            font-weight: bold;
            font-size: 25px;
            left: -8px;
            top: 55px;
        }
    </style>
</head>

<body>
    <span id="sigma">&sum;</span>
    <span id="n">&nfr;</span>
    <span id="i1">&iscr;=1</span>
    <span id="x">X</span>
    <span id="i2">i</span>
</body>

</html>

 

R>

 

HTML5 + CSS3 + JavaScript로 배우는 웹프로그래밍 기초
국내도서
저자 : 천인국
출판 : 인피니티북스 2013.12.19
상세보기
반응형