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

相关文章

HTML5的input标签的`type`属性值详解和代码示例

《HTML5的input标签的`type`属性值详解和代码示例》HTML5的`input`标签提供了多种`type`属性值,用于创建不同类型的输入控件,满足用户输入的多样化需求,从文本输入、密码输入、... 目录一、引言二、文本类输入类型2.1 text2.2 password2.3 textarea(严格

SpringBoot返回文件让前端下载的几种方式

《SpringBoot返回文件让前端下载的几种方式》文章介绍了开发中文件下载的两种常见解决方案,并详细描述了通过后端进行下载的原理和步骤,包括一次性读取到内存和分块写入响应输出流两种方法,此外,还提供... 目录01 背景02 一次性读取到内存,通过响应输出流输出到前端02 将文件流通过循环写入到响应输出流

SpringBoot+Vue3整合SSE实现实时消息推送功能

《SpringBoot+Vue3整合SSE实现实时消息推送功能》在日常开发中,我们经常需要实现实时消息推送的功能,这篇文章将基于SpringBoot和Vue3来简单实现一个入门级的例子,下面小编就和大... 目录前言先大概介绍下SSE后端实现(SpringBoot)前端实现(vue3)1. 数据类型定义2.

前端Visual Studio Code安装配置教程之下载、汉化、常用组件及基本操作

《前端VisualStudioCode安装配置教程之下载、汉化、常用组件及基本操作》VisualStudioCode是微软推出的一个强大的代码编辑器,功能强大,操作简单便捷,还有着良好的用户界面,... 目录一、Visual Studio Code下载二、汉化三、常用组件1、Auto Rename Tag2

vite搭建vue3项目的搭建步骤

《vite搭建vue3项目的搭建步骤》本文主要介绍了vite搭建vue3项目的搭建步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学... 目录1.确保Nodejs环境2.使用vite-cli工具3.进入项目安装依赖1.确保Nodejs环境

Nginx搭建前端本地预览环境的完整步骤教学

《Nginx搭建前端本地预览环境的完整步骤教学》这篇文章主要为大家详细介绍了Nginx搭建前端本地预览环境的完整步骤教学,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录项目目录结构核心配置文件:nginx.conf脚本化操作:nginx.shnpm 脚本集成总结:对前端的意义很多

前端缓存策略的自解方案全解析

《前端缓存策略的自解方案全解析》缓存从来都是前端的一个痛点,很多前端搞不清楚缓存到底是何物,:本文主要介绍前端缓存的自解方案,文中通过代码介绍的非常详细,需要的朋友可以参考下... 目录一、为什么“清缓存”成了技术圈的梗二、先给缓存“把个脉”:浏览器到底缓存了谁?三、设计思路:把“发版”做成“自愈”四、代码

通过React实现页面的无限滚动效果

《通过React实现页面的无限滚动效果》今天我们来聊聊无限滚动这个现代Web开发中不可或缺的技术,无论你是刷微博、逛知乎还是看脚本,无限滚动都已经渗透到我们日常的浏览体验中,那么,如何优雅地实现它呢?... 目录1. 早期的解决方案2. 交叉观察者:IntersectionObserver2.1 Inter

Vue3视频播放组件 vue3-video-play使用方式

《Vue3视频播放组件vue3-video-play使用方式》vue3-video-play是Vue3的视频播放组件,基于原生video标签开发,支持MP4和HLS流,提供全局/局部引入方式,可监听... 目录一、安装二、全局引入三、局部引入四、基本使用五、事件监听六、播放 HLS 流七、更多功能总结在 v

JS纯前端实现浏览器语音播报、朗读功能的完整代码

《JS纯前端实现浏览器语音播报、朗读功能的完整代码》在现代互联网的发展中,语音技术正逐渐成为改变用户体验的重要一环,下面:本文主要介绍JS纯前端实现浏览器语音播报、朗读功能的相关资料,文中通过代码... 目录一、朗读单条文本:① 语音自选参数,按钮控制语音:② 效果图:二、朗读多条文本:① 语音有默认值:②