๐Ÿ’ปCoding/๐Ÿ““ HTML

[HTML] ๋ฒ„ํŠผ ํด๋ฆญ์‹œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ | HTML Aํƒœ๊ทธ download

์Œ์€์‘ 2023. 4. 6. 08:00
728x90
๋ฐ˜์‘ํ˜•
HTML 
Aํƒœ๊ทธ๋กœ ๋‹ค์šด๋กœ๋“œ ๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ
โ†ช๏ธ <a> Tag 
/
" ์‚ฌ์ดํŠธ์—์„œ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด
์ด๋ฏธ์ง€ ๋˜๋Š” ์ž๋ฃŒ๋ฅผ
๋‹ค์šด๋ฐ›๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ค๊ณ  ์‹ถ์„๋•Œ๐Ÿ˜Š"

/

[ ๐Ÿ’– ๊ธฐ๋ณธ ๋ฌธ๋ฒ• ]
โ†ช๏ธ aํƒœ๊ทธ download ์†์„ฑ ์‚ฌ์šฉ
โ†ช๏ธ ํด๋ฆญ์‹œ ๋‹ค์šด๋กœ๋“œ ํ•˜๊ณ  ์‹ถ์€ ํŒŒ์ผ ์œ„์น˜๊ฐ€ ์žˆ๋Š” ๊ฒฝ๋กœ๋ฅผ href="ํŒŒ์ผ๊ฒฝ๋กœ ์ž…๋ ฅ ์œ„์น˜" ์ž…๋ ฅํ•˜๊ธฐ
<a class="pdfDownload" href="ํŒŒ์ผ๊ฒฝ๋กœ" download> PDF ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ธฐ</a>โ€‹
/

๐Ÿ“Œ ๋‹ค์šด๋กœ๋“œ ํŒŒ์ผ ์ด๋ฆ„ ์„ค์ •ํ•˜๊ณ  ์‹ถ์„ ๋•Œ
โ†ช๏ธ download="์ €์žฅ๋  ํŒŒ์ผ์˜ ์ด๋ฆ„"
<a class="pdfDownload" href="ํŒŒ์ผ๊ฒฝ๋กœ" download="๋‹ค์šด๋กœ๋“œํ•˜๋Š” ํŒŒ์ผ๋ช…"> PDF ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ธฐ</a>โ€‹

/

๐Ÿ–คcss๋ฅผ ์ ์šฉํ•ด์„œ ์œ„์— ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ
๋ฒ„ํŠผ์„ ๊พธ๋ฏผ CSS ์™€ HTML ์ฝ”๋“œ์ž…๋‹ˆ๋‹ค.๐Ÿ–ค
โฌ‡๏ธโฌ‡๏ธโฌ‡๏ธ

/

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ํŒŒ์ผ๋‹ค์šด๋กœ๋“œ๋ฒ„ํŠผ๋งŒ๋“ค๊ธฐ</title>
    <style>
        /* hyper link */
        a,
        a:link,
        a:visited{text-decoration:none;}
        a:active,
        a:hover{text-decoration:none;}

        .contactFile {
            display: flex;
        }
        .contactFile .pdfDownload {
            display: inline-block;
            margin: 0px 10px 0px 0px;
            width: 220px;
            height: 50px;
            background: #94989B;
            box-shadow: 0px 12px 23px rgba(0, 0, 0, 0.1);
            text-align: center;
            color: #fff;
            font-family: 'Montserrat';
            font-style: normal;
            font-weight: 400;
            font-size: 15px;
            line-height: 50px;
            letter-spacing: -0.08em;
        }
        .contactFile .telLink {
            display: inline-block;
            width: 220px;
            height: 50px;
            background: #028CD7;
            box-shadow: 0px 12px 23px rgba(0, 0, 0, 0.1);
            text-align: center;
            color: #fff;
            font-family: 'Montserrat';
            font-style: normal;
            font-weight: 400;
            font-size: 15px;
            line-height: 50px;
            letter-spacing: -0.08em;
        }
    </style>
</head>
<body>
    <div class="contactFile">
        <a class="pdfDownload" href="ํŒŒ์ผ๊ฒฝ๋กœ" download>PDF ๋‹ค์šด๋กœ๋“œ&nbsp;&nbsp;&nbsp;&nbsp;&gt;</a>
        <a class="telLink" href="tel:031-000-0000">๋น ๋ฅธ ์ œํœด ๋ฌธ์˜&nbsp;&nbsp;&nbsp;&nbsp;&gt;</a>
    </div>
</body>
</html>

 

โœ… ์ง€์› ๋ธŒ๋ผ์šฐ์ €
โžก๏ธ Chrome ํฌ๋กฌ : 14.0*
โžก๏ธ Explorer ์ต์Šคํ”Œ๋กœ๋Ÿฌ 18.0
โžก๏ธ Firefox ํŒŒ์ด์–ดํญ์Šค : 20.0*
โžก๏ธ Safari ์‚ฌํŒŒ๋ฆฌ : 10.1
โžก๏ธ Opera ์˜คํŽ˜๋ผ : 15.0

**Chrome 65์ด์ƒ ๋ฐ Firefox๋Š” ๋™์ผ์ถœ์ฒ˜(same-origin)๋‹ค์šด๋กœ๋“œ ๋งํฌ๋งŒ ์ง€์›์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

728x90
๋ฐ˜์‘ํ˜•