- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试让我的实时 Twitter 提要紧挨着我的 YouTube 视频,我希望它们在同一行上,但不知道要实现什么代码才能正常工作。
此外,我还想在我的代码中使用的字体系列之外使用另一种字体系列,我在哪里可以找到它们以及如何在我的代码中实现它?
下面我已经为我的网页提供了html,css和js,如果可以的话请修复错误谢谢。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Muhammed's Webpage</title>
<link rel="stylesheet" type="text/css" href="homepage.css">
<script src="homepage.js"></script>
<link href='https://fonts.googleapis.com/css?family=Raleway:700|Arya:400,700|Nunito:700' rel='stylesheet' type='text/css'>
</head>
<body><img src="https://www.facebookbrand.com/img/fb-art.jpg" height=85px>
<div id="page">
<div id="navbar">
<ul>
<li><a href="#BasicInfo"> BASIC INFORMATION </a></li>
<li><a href="#Curriculum Vitae"> CURRICULUM VITAE </a></li>
<li><a href="#Portfolio"> PORTFOLIO </a></li>
<li><a href="#Report"> REPORT </a></li>
</ul>
</div>
<div class="yt">
<iframe height="400" width="700" src="http://www.youtube.com/embed/nKIu9yen5nc">
</iframe>
</div>
<div id = "twitter">
<a class="twitter-timeline" href="https://twitter.com/applenws" data-widget-id="674678491141570560">Tweets by @applenws</a>
</div>
<div class="content" id="Basic Information">
<h3 class="contentbox"> <u>Basic Information</u> </h3>
<p>In this section i will have some information about myself.
<br> For my finished website i'd like to make it responsive, so that it alters and readjusts well to different screen sizes. I'd also like to include a gallery that uses javascript as i haven't used any javascript on this site yet.
<br>
<br> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.
</p>
</div>
<div class="content" id="Curriculum Vitae">
<h3 class="contentbox"> <u>Curriculum Vitae</u> </h3>
<p>
Here i will have my twitter, instagram and facebook feed
<br> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu,
pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo
</div>
<div class="content" id="Portfolio">
<h3 class="contentbox"> <u>Portfolio</u> </h3>
<p>
Here i will showcase some of my current projects and completed projects.
<br>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium
quis, sem. Nulla consequat massa quis enim.
</p>
</div>
<div class="content" id="Report">
<h3 class="contentbox"> <u>Report</u> </h3>
<p>
Here i will showcase some of my current projects and completed projects.
<br>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium
quis, sem. Nulla consequat
</div>
<br>
<br>
</body>
</html>
#page {
margin: auto;
max-width: 85%;
font-family: 'Arya', sans-serif;
color: white;
padding-top: 50px;
}
#navbar {
position: fixed;
top: 0;
width: 100%;
margin-left: 11%;
opacity: 0.8;
max-width: 85%;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: white;
position: fixed;
}
li {
float: left;
border-right: 2px solid black;
}
li:first-child {
border-left: 2px solid black;
}
li a {
display: inline-block;
color: black;
text-align: justify;
padding: 36px 40px;
text-decoration: underline;
font-family: 'Raleway', sans-serif;
}
li a:hover {
background-color: #5c5c5c;
color: white;
}
div.yt {
margin-left: 0px;
margin-top: 0px;
}
#twitter {}
.contentbox {
font-family: 'Arya', sans-serif;
font-weight: 700;
font-size: 2em;
padding-left: 10px;
padding-bottom: 0;
margin-bottom: 0;
background-color: grey;
}
.content {
background-color: grey;
}
p {
text-indent: 3%;
margin: auto;
max-width: 95%;
}
h3 {
margin-left: 5px;
max-width: 95%;
}
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}(document,"script","twitter-wjs");
最佳答案
至于将视频和推特提要放在同一行,请将您的 css 切换为:
#page {
margin: auto;
max-width: 85%;
font-family: 'Arya', sans-serif;
color: white;
padding-top: 50px;
}
#navbar {
position: fixed;
top: 0;
width: 100%;
margin-left: 11%;
opacity: 0.8;
max-width: 85%;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: white;
position: fixed;
}
li {
float: left;
border-right: 2px solid black;
}
li:first-child {
border-left: 2px solid black;
}
li a {
display: inline-block;
color: black;
text-align: justify;
padding: 36px 40px;
text-decoration: underline;
font-family: 'Raleway', sans-serif;
}
li a:hover {
background-color: #5c5c5c;
color: white;
}
div.yt {
margin-left: 0px;
margin-top: 0px;
display:inline-block;
}
#twitter {
display:inline-block;
}
.contentbox {
font-family: 'Arya', sans-serif;
font-weight: 700;
font-size: 2em;
padding-left: 10px;
padding-bottom: 0;
margin-bottom: 0;
background-color: grey;
}
.content {
background-color: grey;
}
p {
text-indent: 3%;
margin: auto;
max-width: 95%;
}
h3 {
margin-left: 5px;
max-width: 95%;
}
重要的部分是 youtube div 和 twitter div 现在都使用样式“display:inline-block”。您可能还想调整推特提要的高度以匹配 youtube 视频的高度。要向您的页面添加不同的字体,我建议使用 https://www.google.com/fonts .选择一个你喜欢的字体,将它添加到你的收藏中,点击右下角的使用,然后复制代码。
关于javascript - 如何在同一行的视频旁边获取我的推特提要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34345518/
我的网站上有一个分享按钮。 但是我需要分享带参数的链接,而且每次的参数都不一样(我需要跟踪分享的用户等) 例如需要共享链接 http://mySite.com/page?userId=111&some
我正在尝试使用推特分享按钮分享推文,并使用推特卡片通过我的链接发布图片,我正在使用: 并使用此共享按钮: Tweet 但此代码仅在 twitter 上共享文本和链接,而不与图像共享。
我正在开展一个项目,我需要找到一些社交事件的影响范围。我想知道有多少人在丹麦的一个名为 Tinderbox 的节日上接触到评论。我所做的是获取 Twitter 上的状态,包括丹麦语中的“tinderb
我正在用 Java 创建一个桌面 Twitter 客户端,并且正在使用 JTwitter。我用这个库测试了几行代码,这看起来不错,但我陷入了困境。运行我的应用程序时,Eclipse 打印: Excep
我有一个 json 文件,我从推特上得到的。如何将以下内容解析为json? {"min_position":"456662757081759744","has_more_items":true,"it
有人知道任何好的广泛的 Twitter 分类语料库吗? 我正在寻找广泛的类别,例如: - 运动 - 科学/技术 - 食物 - 健康 - 娱乐 - 音乐 - 游戏 - 财务 - 教育 - 政治 - 电视
这是我使用 scribe 发送直接消息的代码。但它给了我无效的回应。我做错了什么? OAuthRequest req; OAuthService s; s = new ServiceBuilde
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
是否可以使用 Scribe-Java 和 twitter POST Url“https://upload.twitter.com/1/statuses/update_with_media.json”上
有人可以解释为什么 Twitter future 的行为不是异步的吗?有了这个代码 private val future: Future[String] = Future { Thread
我有一个使用 twitter bootstrap 设置样式的 rails 项目。在一页上,我有三个标签 #1、#2、#3。 我想知道如何从另一个页面链接到特定选项卡,例如选项卡 #2。我尝试使用 an
我一直在广泛寻找答案,但我似乎找不到一个有效的答案。我正在使用 Django 1.4 和 twitter boostrap 2.0.4,我正在尝试使用日期选择器(eyecon)但没有成功。当我单击输入
如何仅使用 javascript(无服务器端身份验证)将消息发布到 Twitter。 例如,我有一个包含用户名、密码、文本字段和提交按钮的表单。 我想在网站的后端使用它。 我读过这个,http://d
如何找到取消关注我的人? 任何人都可以使用 Twitter API 拥有这样的 php 脚本吗?有必要将 Twitter 消息发送给那些取消订阅我的人。 注意:我知道已经有特殊服务,但我需要您的简单服
我正在使用 Twitter Bootstrap 为我父亲创建一个网站,除了一件事之外,它已经完成:我不知道如何: - 减少轮播宽度 - 将旋转木马居中 - 使滚动箭头仍在图像上 here is the
我用它来获取我最新的推文 所以我必须获取最新的 2 条推文,因为我将计数设置为 2,有时它只返回 1,这是为什么? 最佳答案 我今天实际上遇到了同样的问题,在文档中,twitter 不会在列表中返
我在《好莱坞报道》上注意到,他们的推文中有一个“查看摘要”按钮,单击该按钮后,您可以预览其网站上的帖子,其中包含标题、摘录和预览图片。 关于如何完成此任务的文档在哪里有任何线索吗?我浏览过twitte
我想使用 Twitter API,以便我的程序可以发布一些推文。要使用它,我必须在开发中心注册应用程序并获取一些参数,例如“消费者 key ”、“消费者 secret ”等。然后我可以使用 REST
我做了一个类似 wefollow.com 的网站。我每天晚上都在使用 Abraham Williams (abrah.am) 的类(class)来更新用户数据(关注者和推文)。但在 Twitter 更
你好,我已经为 twitter 时间线编写了一个脚本,除了我不知道如何授权我的 twitter api key ,我的 led 标志只是说“错误的身份验证数据” 这是我的代码 #!/usr/bin/p
我是一名优秀的程序员,十分优秀!