CSS Fonts

2023-10-13 15:38
文章标签 css frontend fonts

本文主要是介绍CSS Fonts,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

代码示例(完整版):
index.html
<!DOCTYPE html>
<html>
<head><title>The Rise of Soccer in The US</title><link href="https://fonts.googleapis.com/css?family=Roboto:100" type="text/css" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Playfair+Display" type="text/css" rel="stylesheet"><link href="style.css" type="text/css" rel="stylesheet">
</head>
<body><div class="content"><img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_writer-avatar.jpg" class="writer-img"><h3 class="byline">Article By: Jane Dover</h3><h1>How the Rise of Soccer in the US Is Changing the Face of Youth Sports</h1><h2>The focus on soccer in youth sports programs is exploding nation-wide</h2><p>When the first World Cup arrived in the US in the 90's everyone officially declared that soccer was it. Well it's taken it's time but we can definitely see the influence of soccer, especially women's soccer, across the US. This year, 3 million kids played in youth soccer leagues with 2/3 of those leagues for girls. In fact, in the 12-17 age range the MLS has surpassed the MLB and NFL in popularity.</p><p>Part of this meteoric rise can be attributed to the impressively soaring ad dollars being pumped into the Women's World Cup games in 2014. The women's games generated $40 million for Fox, that's definitely not chump change. And those advertisers, like ATT, Coca Cola, Verizon, Nike, Visa, and other heavy hitters, are working to make sure they see those numbers grow year after year by investing in youth soccer facilities and promoting programs across the country. </p><p>Now that big business is involved you can be assured you'll see a continued rise in popularity in soccer across the country for years to come. </p></div><div class="image"><p class="caption">The local semi- pro soccer team in Seattle, WA plays an international friendly</p></div></body>
</html>style.css
body {/* Old browsers */background: #141E30;/* Chrome 10-25, Safari 5.1-6 */background: -webkit-linear-gradient(-45deg, #35577D, #141E30);/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */background: linear-gradient(-45deg, #35577D, #141E30);margin: 0;padding: 0;
}h1 {color: #FFF;font-family:Playfair Display,serif;font-size: 32px;padding-top: 100px;text-align: left;width: 60%;text-transform:uppercase;
}h2 {border-bottom: 1px solid rgba(255, 255, 255, 0.5);color: rgba(255, 255, 255, 0.5);font-family:Roboto,sans-serif;font-weight: 100;font-size: 22px;font-style:italic;line-height: 24px;word-spacing:0.05em;letter-spacing:0.02em;padding-bottom: 30px;text-align: left;width: 70%;
}p {color: AliceBlue;font-family:Roboto,sans-serif;font-size:20px;line-height: 1.7em;font-weight:100;text-align: left;width: 100%;
}.byline {color: rgba(255, 255, 255, 0.5);float: left;font-family: 'Roboto', sans-serif;font-weight: 100;font-size: 14px;padding-left: 10px;text-transform: uppercase;
}.caption {background-color: rgba(0, 0, 0, 0.6);color: rgba(255, 255, 255, 0.65);display: block;font-family: 'Playfair Display', serif;font-size: 14px;font-style: italic;line-height: 14px;margin-left: 20px;padding: 10px;position: relative;top: 80%;width: 60%;
}.content {padding: 40px;
}.image {background-image: url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_soccer.jpeg");background-size: cover;background-position: center;height: 300px;
}.writer-img {-webkit-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);-moz-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);float: left;width: 50px;
}


这篇关于CSS Fonts的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/204204

相关文章

前端下载文件时如何后端返回的文件流一些常见方法

《前端下载文件时如何后端返回的文件流一些常见方法》:本文主要介绍前端下载文件时如何后端返回的文件流一些常见方法,包括使用Blob和URL.createObjectURL创建下载链接,以及处理带有C... 目录1. 使用 Blob 和 URL.createObjectURL 创建下载链接例子:使用 Blob

Vuex Actions多参数传递的解决方案

《VuexActions多参数传递的解决方案》在Vuex中,actions的设计默认只支持单个参数传递,这有时会限制我们的使用场景,下面我将详细介绍几种处理多参数传递的解决方案,从基础到高级,... 目录一、对象封装法(推荐)二、参数解构法三、柯里化函数法四、Payload 工厂函数五、TypeScript

Vue3使用router,params传参为空问题

《Vue3使用router,params传参为空问题》:本文主要介绍Vue3使用router,params传参为空问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录vue3使用China编程router,params传参为空1.使用query方式传参2.使用 Histo

CSS Padding 和 Margin 区别全解析

《CSSPadding和Margin区别全解析》CSS中的padding和margin是两个非常基础且重要的属性,它们用于控制元素周围的空白区域,本文将详细介绍padding和... 目录css Padding 和 Margin 全解析1. Padding: 内边距2. Margin: 外边距3. Padd

CSS will-change 属性示例详解

《CSSwill-change属性示例详解》will-change是一个CSS属性,用于告诉浏览器某个元素在未来可能会发生哪些变化,本文给大家介绍CSSwill-change属性详解,感... will-change 是一个 css 属性,用于告诉浏览器某个元素在未来可能会发生哪些变化。这可以帮助浏览器优化

CSS去除a标签的下划线的几种方法

《CSS去除a标签的下划线的几种方法》本文给大家分享在CSS中,去除a标签(超链接)的下划线的几种方法,本文给大家介绍的非常详细,感兴趣的朋友一起看看吧... 在 css 中,去除a标签(超链接)的下划线主要有以下几种方法:使用text-decoration属性通用选择器设置:使用a标签选择器,将tex

前端高级CSS用法示例详解

《前端高级CSS用法示例详解》在前端开发中,CSS(层叠样式表)不仅是用来控制网页的外观和布局,更是实现复杂交互和动态效果的关键技术之一,随着前端技术的不断发展,CSS的用法也日益丰富和高级,本文将深... 前端高级css用法在前端开发中,CSS(层叠样式表)不仅是用来控制网页的外观和布局,更是实现复杂交

Python将博客内容html导出为Markdown格式

《Python将博客内容html导出为Markdown格式》Python将博客内容html导出为Markdown格式,通过博客url地址抓取文章,分析并提取出文章标题和内容,将内容构建成html,再转... 目录一、为什么要搞?二、准备如何搞?三、说搞咱就搞!抓取文章提取内容构建html转存markdown

在React中引入Tailwind CSS的完整指南

《在React中引入TailwindCSS的完整指南》在现代前端开发中,使用UI库可以显著提高开发效率,TailwindCSS是一个功能类优先的CSS框架,本文将详细介绍如何在Reac... 目录前言一、Tailwind css 简介二、创建 React 项目使用 Create React App 创建项目

vue使用docxtemplater导出word

《vue使用docxtemplater导出word》docxtemplater是一种邮件合并工具,以编程方式使用并处理条件、循环,并且可以扩展以插入任何内容,下面我们来看看如何使用docxtempl... 目录docxtemplatervue使用docxtemplater导出word安装常用语法 封装导出方