- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在查看漂亮的时间线脚本并想使用,我根据我的设计对 css 进行了一些更改,但我想知道是否可以在滚动页面时将事件年份的颜色从灰色更改为红色,
我查看了代码,发现当页面滚动时,没有更改任何类来反射(reflect)事件年份的粘性行为。
#timeline h3 {
position: -webkit-sticky;
position: sticky;
top: 5rem;
color: #888;
margin: 0;
font-size: 1em;
font-weight: 400;
}
@charset "UTF-8";
@import url(https://fonts.googleapis.com/css?family=Fira+Sans:200,400,500);
* {
border: 0;
margin: 0;
padding: 0;
}
html {
height: 100%;
}
body {
height: inherit;
display: flex;
flex-direction: column;
font-family: 'Fira Sans', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #79838c;
}
a {
color: #50585f;
text-decoration: none;
}
a:hover {
color: #383e44;
}
div.container {
display: flex;
flex: auto;
flex-direction: column;
max-height: 100%;
}
div.header {
height: auto;
text-align: center;
background: slategrey;
color: ghostwhite;
padding: 2.3rem 1rem 2.3rem 1rem;
position: relative;
}
div.header:after {
content: '';
position: absolute;
bottom: -5rem;
left: 0rem;
height: 5.1rem;
display: block;
width: 100%;
z-index: 300;
background: -moz-linear-gradient(top, white 20%, rgba(255, 255, 255, 0) 100%);
/* FF3.6-15 */
background: -webkit-linear-gradient(top, white 20%, rgba(255, 255, 255, 0) 100%);
/* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, white 20%, rgba(255, 255, 255, 0) 100%);
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 );
/* IE6-9 */
}
div.header h1 {
margin-top: .8rem;
margin-bottom: .5rem;
font-weight: 200;
font-size: 1.6em;
letter-spacing: 0.1rem;
text-transform: uppercase;
}
@media (min-width: 62em) {
div.header h1 {
font-size: 1.9em;
letter-spacing: 0.2rem;
}
}
div.header h2 {
font-size: 1.1em;
font-weight: 400;
color: #cfd7de;
max-width: 30rem;
margin: auto;
}
div.item {
display: flex;
flex: auto;
overflow-y: auto;
padding: 0rem 1rem 0rem 1rem;
}
#timeline {
position: relative;
display: table;
height: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 5rem;
}
#timeline div:after {
content: '';
width: 2px;
position: absolute;
top: .5rem;
bottom: 0rem;
left: 60px;
z-index: 1;
background: #C5C5C5;
}
#timeline h3 {
position: -webkit-sticky;
position: sticky;
top: 5rem;
color: #888;
margin: 0;
font-size: 1em;
font-weight: 400;
}
@media (min-width: 62em) {
#timeline h3 {
font-size: 1.1em;
}
}
#timeline section.year {
position: relative;
}
#timeline section.year:first-child section {
margin-top: -1.3em;
padding-bottom: 0px;
}
#timeline section.year section {
position: relative;
padding-bottom: 1.25em;
margin-bottom: 2.2em;
}
#timeline section.year section h4 {
position: absolute;
bottom: 0;
font-size: .9em;
font-weight: 400;
line-height: 1.2em;
margin: 0;
padding: 0 0 0 89px;
color: #C5C5C5;
}
@media (min-width: 62em) {
#timeline section.year section h4 {
font-size: 1em;
}
}
#timeline section.year section ul {
list-style-type: none;
padding: 0 0 0 75px;
margin: -1.35rem 0 1em;
max-width: 32rem;
font-size: 1em;
}
@media (min-width: 62em) {
#timeline section.year section ul {
font-size: 1.1em;
padding: 0 0 0 81px;
}
}
#timeline section.year section ul:last-child {
margin-bottom: 0;
}
#timeline section.year section ul:first-of-type:after {
content: '';
width: 10px;
height: 10px;
background: #C5C5C5;
border: 2px solid #FFFFFF;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
border-radius: 50%;
position: absolute;
left: 54px;
top: 3px;
z-index: 2;
}
#timeline section.year section ul li {
margin-left: .5rem;
}
#timeline section.year section ul li:before {
content: '·';
margin-left: -.5rem;
padding-right: .3rem;
}
#timeline section.year section ul li:not(:first-child) {
margin-top: .5rem;
}
#timeline section.year section ul li span.price {
color: mediumturquoise;
font-weight: 500;
}
#price {
display: inline;
}
svg {
border: 3px solid white;
border-radius: 50%;
box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Bitcoin timeline with fixed header using flexbox</title>
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
<div class="item">
<div id="timeline">
<div>
<section class="year">
<h3>2007</h3>
<section>
<ul>
<li>Satoshi Nakamoto began working on the Bitcoin concept.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2008</h3>
<section>
<h4>August</h4>
<ul>
<li>Neal Kin, Vladimir Oksman, and Charles Bry file an application for an encryption patent application.</li>
<li>Bitcoin.org was registered at <a href="https://anonymousspeech.com/">anonymousspeech.com</a>.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>Nakamoto describes the Bitcoin currency and solves the problem of double spending.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>The Bitcoin project is registered on <a href="https://sourceforge.net/">SourceForge.net</a>.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2009</h3>
<section>
<h4>January</h4>
<ul>
<li>Block 0 is established.</li>
<li>Version 0.1 of Bitcoin is released.</li>
<li>The first Bitcoin transaction.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>An exchange rate is established.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Version 0.2 is released.</li>
<li>The difficulty increases.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2010</h3>
<section>
<h4>February</h4>
<ul>
<li>The Bitcoin Market is established as a Bitcoin currency exchange.</li>
<li>Encryption patent is published.</li>
</ul>
</section>
<section>
<h4>May</h4>
<ul>
<li>The first real-world transaction using 10,000 BTC spent on pizza.</li>
</ul>
</section>
<section>
<h4>July</h4>
<ul>
<li>Version 0.3 released.</li>
<li>In five days, the price grew 1000%, rising from <span class="price">$0.008</span> to <span class="price">$0.08</span> for 1 bitcoin.</li>
<li>The MtGox Bitcoin currency exchange market is established.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Exploit generates 184 billion Bitcoins.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>Financial task force issues warning.</li>
<li>The first public version of an OpenCL miner is released.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Market cap exceeds $1 million USD.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Bitcoind compiled for Nokia N900.</li>
<li>First mobile Bitcoin transaction.</li>
<li>Difficulty increases.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2011</h3>
<section>
<h4>January</h4>
<ul>
<li>Silk Road opens for business.</li>
<li>25% of total Bitcoins generated.</li>
</ul>
</section>
<section>
<h4>February</h4>
<ul>
<li>Bitcoin reaches parity with US dollar.</li>
<li><a href="https://weusecoins.com/">WeUseCoins.com</a> is created.</li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Second largest decrease in difficulty.</li>
<li>Britcoin opens for trading.</li>
<li>Bitcoin Brasil opens.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Bitcoin passes parity with Euro.</li>
<li>Difficulty surpasses 100,000.</li>
</ul>
</section>
<section>
<h4>June</h4>
<ul>
<li>Bitcoin Market drops PayPal.</li>
<li>The largest percentage price decrease to-date became known as the Great Bubble of 2011. Top of bubble at <span class="price">$31.</span></li>
<li>WikiLeaks starts accepting Bitcoin.</li>
<li>Major breach of security at MtGox.</li>
<li>Difficulty passes 1 million.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Bitcoin Conference and World Expo in New York City, NY.</li>
<li>P2Pool mines its first block.</li>
<li>Back-to-back drop in difficulty.</li>
</ul>
</section>
<section>
<h4>September</h4>
<ul>
<li>Casascius coins mint physical Bitcoins.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin & Future Technology European Conference in Prague, Czech Republic.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li><span class="price">$2</span> minimum price after the first price drop.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2012</h3>
<section>
<h4>September</h4>
<ul>
<li>London 2012 Bitcoin Conference.</li>
<li>Bitcoin Foundation begins.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Slowly rising for a year. Price at <span class="price">$13.</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2013</h3>
<section>
<h4>February</h4>
<ul>
<li>Version 0.8 released.</li>
<li>Bitcoin goes up to <span class="price">$30.</span></li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Bitcoin spikes to $74.90.</li>
<li>Market cap reaches $1 billion.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Bitcoin surpasses <span class="price">$100.</span></li>
<li>Price hits an all-time high of <span class="price">$266.</span></li>
<li>Bitcoin Central is hacked.</li>
</ul>
</section>
<section>
<h4>May</h4>
<ul>
<li>First Bitcoin ATM unveiled.</li>
<li>Bitcoin Central gets hacked again.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>FBI shuts down Silk Road.</li>
<li>Bitcoin price drops from <span class="price">$139</span> to <span class="price">$109.71</span> in less than three hours after Silk Road closure, recovers.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin price surges to a new all-time record of <span class="price">$1242.</span></li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Price crashed to <span class="price">$600</span>, rebounded to <span class="price">$1000</span>, crashed again to the <span class="price">$500</span> range. Stabilized in between.</li>
<li>China's Central Bank bans Bitcoin transactions.</li>
<li>The network exceeded 10 petahash/sec.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2014</h3>
<section>
<h4>January</h4>
<ul>
<li>Price spiked to <span class="price">$1000</span>, then settled in the <span class="price">$800–$900</span>range.</li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Version 0.9 released.</li>
</ul>
</section>
<section>
<h4>June</h4>
<ul>
<li>The network exceeded 100 petahash/sec.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Microsoft began to accept bitcoin to buy Xbox games and Windows apps.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2015</h3>
<section>
<h4>February</h4>
<ul>
<li>Version 0.10 released.</li>
</ul>
</section>
<section>
<h4>July</h4>
<ul>
<li>Version 0.11 released.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>2015 record high of <span class="price">$504.</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2016</h3>
<section>
<h4>January</h4>
<ul>
<li>Price at <span class="price">$1150</span> per bitcoin.</li>
<li>Price fell 30% in a week, reaching a multi-month low of <span class="price">$750.</span></li>
<li>The network exceeded 1 exahash/sec.</li>
</ul>
</section>
<section>
<h4>February</h4>
<ul>
<li>Version 0.12 released.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Steam started accepting bitcoin as payment.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Version 0.13 released.</li>
</ul>
</section>
<section>
<h4>September</h4>
<ul>
<li>There are 770 bitcoin ATMs worldwide.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2017</h3>
<section>
<h4>March</h4>
<ul>
<li>Version 0.14 released.</li>
<li>The price of 1 bitcoin surpassed the spot price of an ounce of gold for the first time.</li>
<li>The number of GitHub projects related to bitcoin passed 10,000.</li>
<li>Price traded above <span class="price">$1290.</span></li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Japan Declares Bitcoin as Legel Tender</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Bitcoin "splits" into Bitcoin (BTC) and Bitcoin Cash (BCH)</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin for the first time hit <span class="price">$10,000</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2019</h3>
<section>
<h4>Today</h4>
<ul>
<li>At the moment, one bitcoin cost:
<span class="price">
<div id="price"></div>.
</span>
</li>
</ul>
</section>
</section>
</div>
</div>
</div>
</div>
<!-- partial -->
<script >
</script>
</body>
</html>
最佳答案
好的,这是一个想法,希望你能做到
isInViewport
检查元素是否在视口(viewport)中 markActive
查询所有年份元素删除以前的事件类并循环查找视口(viewport)中的第一个元素,将其标记为事件markActive
您时间线中的活跃年份。去抖它,所以我们不会在主线程上做很多处理。 markActive
方法 window.onload
用于在页面加载时标记时间轴中的事件年份 window.onload = markActive;
container.addEventListener('scroll', function (e){
setTimeout(markActive, 0)
});
function markActive() {
activeYear.classList.remove('active');
//const timelines = document.querySelectorAll('section.year > h3'); //es6
var timelines = Array.prototype.slice.call(document.querySelectorAll('section.year > h3'));//ES5
for(let i=0; i<timelines.length; i++) {
if(isInViewport(timelines[i])) {
timelines[i].classList.add('active');
return;
}
}
}
window.onload = markActive; // when page loads
var debounce = 0;
document.querySelector('.item').addEventListener('scroll', function (e) {
if(debounce){
clearTimeout(debounce);
}
debounce = setTimeout(markActive, 0);
});
function markActive() {
var activeYear = document.querySelector('.active');
if(activeYear){
activeYear.classList.remove('active');
}
// work on a detached list
//const timelines = document.querySelectorAll('section.year > h3'); //es6
var timelines = Array.prototype.slice.call(document.querySelectorAll('section.year > h3'));//ES5
for(var i=0; i<timelines.length; i++) {
if(isInViewport(timelines[i])) {
timelines[i].classList.add('active');
break;
}
}
}
function isInViewport(elem) {
var bounding = elem.getBoundingClientRect();
return (
bounding.top >= 0 &&
bounding.left >= 0 &&
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
@charset "UTF-8";
@import url(https://fonts.googleapis.com/css?family=Fira+Sans:200,400,500);
* {
border: 0;
margin: 0;
padding: 0;
}
html {
height: 100%;
}
body {
height: inherit;
display: flex;
flex-direction: column;
font-family: 'Fira Sans', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #79838c;
}
a {
color: #50585f;
text-decoration: none;
}
a:hover {
color: #383e44;
}
div.container {
display: flex;
flex: auto;
flex-direction: column;
max-height: 100%;
}
div.header {
height: auto;
text-align: center;
background: slategrey;
color: ghostwhite;
padding: 2.3rem 1rem 2.3rem 1rem;
position: relative;
}
div.header:after {
content: '';
position: absolute;
bottom: -5rem;
left: 0rem;
height: 5.1rem;
display: block;
width: 100%;
z-index: 300;
background: -moz-linear-gradient(top, white 20%, rgba(255, 255, 255, 0) 100%);
/* FF3.6-15 */
background: -webkit-linear-gradient(top, white 20%, rgba(255, 255, 255, 0) 100%);
/* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, white 20%, rgba(255, 255, 255, 0) 100%);
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 );
/* IE6-9 */
}
div.header h1 {
margin-top: .8rem;
margin-bottom: .5rem;
font-weight: 200;
font-size: 1.6em;
letter-spacing: 0.1rem;
text-transform: uppercase;
}
@media (min-width: 62em) {
div.header h1 {
font-size: 1.9em;
letter-spacing: 0.2rem;
}
}
div.header h2 {
font-size: 1.1em;
font-weight: 400;
color: #cfd7de;
max-width: 30rem;
margin: auto;
}
div.item {
display: flex;
flex: auto;
overflow-y: auto;
padding: 0rem 1rem 0rem 1rem;
}
#timeline {
position: relative;
display: table;
height: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 5rem;
}
#timeline div:after {
content: '';
width: 2px;
position: absolute;
top: .5rem;
bottom: 0rem;
left: 60px;
z-index: 1;
background: #C5C5C5;
}
#timeline h3 {
position: -webkit-sticky;
position: sticky;
top: 5rem;
color: #888;
margin: 0;
font-size: 1em;
font-weight: 400;
}
#timeline h3.active {
color: green;
font-weight: bold;
}
@media (min-width: 62em) {
#timeline h3 {
font-size: 1.1em;
}
}
#timeline section.year {
position: relative;
}
#timeline section.year:first-child section {
margin-top: -1.3em;
padding-bottom: 0px;
}
#timeline section.year section {
position: relative;
padding-bottom: 1.25em;
margin-bottom: 2.2em;
}
#timeline section.year section h4 {
position: absolute;
bottom: 0;
font-size: .9em;
font-weight: 400;
line-height: 1.2em;
margin: 0;
padding: 0 0 0 89px;
color: #C5C5C5;
}
@media (min-width: 62em) {
#timeline section.year section h4 {
font-size: 1em;
}
}
#timeline section.year section ul {
list-style-type: none;
padding: 0 0 0 75px;
margin: -1.35rem 0 1em;
max-width: 32rem;
font-size: 1em;
}
@media (min-width: 62em) {
#timeline section.year section ul {
font-size: 1.1em;
padding: 0 0 0 81px;
}
}
#timeline section.year section ul:last-child {
margin-bottom: 0;
}
#timeline section.year section ul:first-of-type:after {
content: '';
width: 10px;
height: 10px;
background: #C5C5C5;
border: 2px solid #FFFFFF;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
border-radius: 50%;
position: absolute;
left: 54px;
top: 3px;
z-index: 2;
}
#timeline section.year section ul li {
margin-left: .5rem;
}
#timeline section.year section ul li:before {
content: '·';
margin-left: -.5rem;
padding-right: .3rem;
}
#timeline section.year section ul li:not(:first-child) {
margin-top: .5rem;
}
#timeline section.year section ul li span.price {
color: mediumturquoise;
font-weight: 500;
}
#price {
display: inline;
}
svg {
border: 3px solid white;
border-radius: 50%;
box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Bitcoin timeline with fixed header using flexbox</title>
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
<div class="item">
<div id="timeline">
<div>
<section class="year">
<h3>2007</h3>
<section>
<ul>
<li>Satoshi Nakamoto began working on the Bitcoin concept.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2008</h3>
<section>
<h4>August</h4>
<ul>
<li>Neal Kin, Vladimir Oksman, and Charles Bry file an application for an encryption patent application.</li>
<li>Bitcoin.org was registered at <a href="https://anonymousspeech.com/">anonymousspeech.com</a>.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>Nakamoto describes the Bitcoin currency and solves the problem of double spending.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>The Bitcoin project is registered on <a href="https://sourceforge.net/">SourceForge.net</a>.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2009</h3>
<section>
<h4>January</h4>
<ul>
<li>Block 0 is established.</li>
<li>Version 0.1 of Bitcoin is released.</li>
<li>The first Bitcoin transaction.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>An exchange rate is established.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Version 0.2 is released.</li>
<li>The difficulty increases.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2010</h3>
<section>
<h4>February</h4>
<ul>
<li>The Bitcoin Market is established as a Bitcoin currency exchange.</li>
<li>Encryption patent is published.</li>
</ul>
</section>
<section>
<h4>May</h4>
<ul>
<li>The first real-world transaction using 10,000 BTC spent on pizza.</li>
</ul>
</section>
<section>
<h4>July</h4>
<ul>
<li>Version 0.3 released.</li>
<li>In five days, the price grew 1000%, rising from <span class="price">$0.008</span> to <span class="price">$0.08</span> for 1 bitcoin.</li>
<li>The MtGox Bitcoin currency exchange market is established.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Exploit generates 184 billion Bitcoins.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>Financial task force issues warning.</li>
<li>The first public version of an OpenCL miner is released.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Market cap exceeds $1 million USD.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Bitcoind compiled for Nokia N900.</li>
<li>First mobile Bitcoin transaction.</li>
<li>Difficulty increases.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2011</h3>
<section>
<h4>January</h4>
<ul>
<li>Silk Road opens for business.</li>
<li>25% of total Bitcoins generated.</li>
</ul>
</section>
<section>
<h4>February</h4>
<ul>
<li>Bitcoin reaches parity with US dollar.</li>
<li><a href="https://weusecoins.com/">WeUseCoins.com</a> is created.</li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Second largest decrease in difficulty.</li>
<li>Britcoin opens for trading.</li>
<li>Bitcoin Brasil opens.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Bitcoin passes parity with Euro.</li>
<li>Difficulty surpasses 100,000.</li>
</ul>
</section>
<section>
<h4>June</h4>
<ul>
<li>Bitcoin Market drops PayPal.</li>
<li>The largest percentage price decrease to-date became known as the Great Bubble of 2011. Top of bubble at <span class="price">$31.</span></li>
<li>WikiLeaks starts accepting Bitcoin.</li>
<li>Major breach of security at MtGox.</li>
<li>Difficulty passes 1 million.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Bitcoin Conference and World Expo in New York City, NY.</li>
<li>P2Pool mines its first block.</li>
<li>Back-to-back drop in difficulty.</li>
</ul>
</section>
<section>
<h4>September</h4>
<ul>
<li>Casascius coins mint physical Bitcoins.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin & Future Technology European Conference in Prague, Czech Republic.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li><span class="price">$2</span> minimum price after the first price drop.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2012</h3>
<section>
<h4>September</h4>
<ul>
<li>London 2012 Bitcoin Conference.</li>
<li>Bitcoin Foundation begins.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Slowly rising for a year. Price at <span class="price">$13.</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2013</h3>
<section>
<h4>February</h4>
<ul>
<li>Version 0.8 released.</li>
<li>Bitcoin goes up to <span class="price">$30.</span></li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Bitcoin spikes to $74.90.</li>
<li>Market cap reaches $1 billion.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Bitcoin surpasses <span class="price">$100.</span></li>
<li>Price hits an all-time high of <span class="price">$266.</span></li>
<li>Bitcoin Central is hacked.</li>
</ul>
</section>
<section>
<h4>May</h4>
<ul>
<li>First Bitcoin ATM unveiled.</li>
<li>Bitcoin Central gets hacked again.</li>
</ul>
</section>
<section>
<h4>October</h4>
<ul>
<li>FBI shuts down Silk Road.</li>
<li>Bitcoin price drops from <span class="price">$139</span> to <span class="price">$109.71</span> in less than three hours after Silk Road closure, recovers.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin price surges to a new all-time record of <span class="price">$1242.</span></li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Price crashed to <span class="price">$600</span>, rebounded to <span class="price">$1000</span>, crashed again to the <span class="price">$500</span> range. Stabilized in between.</li>
<li>China's Central Bank bans Bitcoin transactions.</li>
<li>The network exceeded 10 petahash/sec.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2014</h3>
<section>
<h4>January</h4>
<ul>
<li>Price spiked to <span class="price">$1000</span>, then settled in the <span class="price">$800–$900</span>range.</li>
</ul>
</section>
<section>
<h4>March</h4>
<ul>
<li>Version 0.9 released.</li>
</ul>
</section>
<section>
<h4>June</h4>
<ul>
<li>The network exceeded 100 petahash/sec.</li>
</ul>
</section>
<section>
<h4>December</h4>
<ul>
<li>Microsoft began to accept bitcoin to buy Xbox games and Windows apps.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2015</h3>
<section>
<h4>February</h4>
<ul>
<li>Version 0.10 released.</li>
</ul>
</section>
<section>
<h4>July</h4>
<ul>
<li>Version 0.11 released.</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>2015 record high of <span class="price">$504.</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2016</h3>
<section>
<h4>January</h4>
<ul>
<li>Price at <span class="price">$1150</span> per bitcoin.</li>
<li>Price fell 30% in a week, reaching a multi-month low of <span class="price">$750.</span></li>
<li>The network exceeded 1 exahash/sec.</li>
</ul>
</section>
<section>
<h4>February</h4>
<ul>
<li>Version 0.12 released.</li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Steam started accepting bitcoin as payment.</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Version 0.13 released.</li>
</ul>
</section>
<section>
<h4>September</h4>
<ul>
<li>There are 770 bitcoin ATMs worldwide.</li>
</ul>
</section>
</section>
<section class="year">
<h3>2017</h3>
<section>
<h4>March</h4>
<ul>
<li>Version 0.14 released.</li>
<li>The price of 1 bitcoin surpassed the spot price of an ounce of gold for the first time.</li>
<li>The number of GitHub projects related to bitcoin passed 10,000.</li>
<li>Price traded above <span class="price">$1290.</span></li>
</ul>
</section>
<section>
<h4>April</h4>
<ul>
<li>Japan Declares Bitcoin as Legel Tender</li>
</ul>
</section>
<section>
<h4>August</h4>
<ul>
<li>Bitcoin "splits" into Bitcoin (BTC) and Bitcoin Cash (BCH)</li>
</ul>
</section>
<section>
<h4>November</h4>
<ul>
<li>Bitcoin for the first time hit <span class="price">$10,000</span></li>
</ul>
</section>
</section>
<section class="year">
<h3>2019</h3>
<section>
<h4>Today</h4>
<ul>
<li>At the moment, one bitcoin cost:
<span class="price">
<div id="price"></div>.
</span>
</li>
</ul>
</section>
</section>
</div>
</div>
</div>
</div>
<!-- partial -->
<script >
</script>
</body>
</html>
关于javascript - 激活时更改粘性文本的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58180089/
我有一个 html 格式的表单: 我需要得到 JavaScript在value input 字段执行,但只能通过表单的 submit .原因是页面是一个模板所以我不控制它(不能有
我管理的论坛是托管软件,因此我无法访问源代码,我只能向页面添加 JavaScript 来实现我需要完成的任务。 我正在尝试用超链接替换所有页面上某些文本关键字的第一个实例。我还根据国家/地区代码对这些
我正在使用 JS 打开新页面并将 HTML 代码写入其中,但是当我尝试使用 document.write() 在新页面中编写 JS 时功能不起作用。显然,一旦看到 ,主 JS 就会关闭。用于即将打开的
提问不是为了解决问题,提问是为了更好地理解系统 专家!我知道每当你将 javascript 代码输入 javascript 引擎时,它会立即由 javascript 引擎执行。由于没有看过Engi
我在一个文件夹中有两个 javascript 文件。我想将一个变量的 javascript 文件传递到另一个。我应该使用什么程序? 最佳答案 window.postMessage用于跨文档消息。使
我有一个练习,我需要输入两个输入并检查它们是否都等于一个。 如果是 console.log 正则 console.log false 我试过这样的事情: function isPositive(fir
我正在做一个Web应用程序,计划允许其他网站(客户端)在其页面上嵌入以下javascript: 我的网络应用程序位于 http://example.org 。 我不能假设客户端网站的页面有 JQue
目前我正在使用三个外部 JS 文件。 我喜欢将所有三个 JS 文件合而为一。 尽一切可能。我创建 aio.js 并在 aio.js 中 src="https://code.jquery.com/
我有例如像这样的数组: var myArray = []; var item1 = { start: '08:00', end: '09:30' } var item2 = {
所以我正在制作一个 Chrome 扩展,它使用我制作的一些 TamperMonkey 脚本。我想要一个“主”javascript 文件,您可以在其中包含并执行其他脚本。我很擅长使用以下行将其他 jav
我有 A、B html 和 A、B javascript 文件。 并且,如何将 A JavaScript 中使用的全局变量直接移动到 B JavaScript 中? 示例 JavaScript) va
我需要将以下整个代码放入名为 activate.js 的 JavaScript 中。你能告诉我怎么做吗? var int = new int({ seconds: 30, mark
我已经为我的 .net Web 应用程序创建了母版页 EXAMPLE1.Master。他们的 I 将值存储在 JavaScript 变量中。我想在另一个 JS 文件中检索该变量。 示例1.大师:-
是否有任何库可以用来转换这样的代码: function () { var a = 1; } 像这样的代码: function () { var a = 1; } 在我的浏览器中。因为我在 Gi
我收到语法缺失 ) 错误 $(document).ready(function changeText() { var p = document.getElementById('bidp
我正在制作进度条。它有一个标签。我想调整某个脚本完成的标签。在找到可能的解决方案的一些答案后,我想出了以下脚本。第一个启动并按预期工作。然而,第二个却没有。它出什么问题了?代码如下: HTML:
这里有一个很简单的问题,我简单的头脑无法回答:为什么我在外部库中加载时,下面的匿名和onload函数没有运行?我错过了一些非常非常基本的东西。 Library.js 只有一行:console.log(
我知道 javascript 是一种客户端语言,但如果实际代码中嵌入的 javascript 代码以某种方式与在控制台上运行的代码不同,我会尝试找到答案。让我用一个例子来解释它: 我想创建一个像 Mi
我如何将这个内联 javascript 更改为 Unobtrusive JavaScript? 谢谢! 感谢您的回答,但它不起作用。我的代码是: PHP js文件 document.getElem
我正在寻找将简单的 JavaScript 对象“转储”到动态生成的 JavaScript 源代码中的最优雅的方法。 目的:假设我们有 node.js 服务器生成 HTML。我们在服务器端有一个对象x。
我是一名优秀的程序员,十分优秀!