簡體   English   中英

我的div即使達到100%的高度也只能到達頁面的一半

[英]My div only reaches half the page even on 100% height

我在這里有此頁面,即使在100%高度上,div .menu-content只能達到頁面的一半。 我真的不知道為什么。

謝謝!

<div class = "menu-content">
<div class="wrapper" style = "background-color:white; height:100%; width:750px;">
 <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
  <?php the_content(); ?>

<?php endwhile; ?>

<?php else : ?>
 <?php global $rd_data; if ($rd_data['rd_error_text']) { ?>
  <?php echo $rd_data['rd_error_text']; ?>
  <?php } else { ?>
  Oops, It looks like an error has occured
  <?php } ?>
<?php endif; ?>
</div>

試試這個CSS。

.menu-content {
    display: table;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    position: relative;
}

您需要去除height:100%; 在CSS代碼中的.menu-content .wrapper以及您在其上設置的內聯樣式上。

這樣,它將被設置為默認的height:auto; 高度將根據其內容進行計算。

您必須以這種方式使用CSS。 使用overflow:auto屬性,並從類.wrapper刪除不必要的屬性,例如z-indexposition

.menu-content {
    background-color: #FFFFFF;
    height: 100%;
    overflow: auto;
}

.wrapper {
    margin: 0 auto;
    width: 750px;
}

添加html {height: 100%} ,它應該可以工作。

為了解決這個問題,您只需添加一個style = "clear:both;"的div即可style = "clear:both;" 在您的div .menu-content末尾

像這樣 :

<div class="menu-content">
.....................
  <div style="clear:both;"></div>
</div>

這<div class="“container”">即使 html、body 和 div 設置為 height=100%,高度也不會填滿整個頁面</div><div id="text_translate"><p>我現在正在建立一個致敬頁面。 我一直在設置 html,body 和 height=100%,但是當我檢查它時,只有 HTML 和 body 標簽高度填滿了瀏覽器的整個頁面,而 div 元素沒有。 我認為這使我的時間線內容溢出。 我能知道我該如何解決嗎?</p><p> 另外,頁面沒有響應,我能知道我該如何解決這個問題嗎? 我是 HTML 和 css 的初學者,所以可能需要一些指導......提前謝謝。 </p><p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"><div class="snippet-code"><pre class="snippet-code-css lang-css prettyprint-override"> /* universal setting */ *{ padding: 0; margin: 0; } /* introduction */.introduction{ background: #f9f9f9; padding-bottom: 10px; }.Elon-Musk-photo img{ width: 110px; height: 110px; border-radius: 100%; float: left; margin: 0 20px 20px 20px; }.Name{ text-align: center; margin-bottom: 10px; }.introduction-description p{ font-size: 16px; }.des2 h2{ width: 100%; text-align: center; font-size: 30px; font-family: "Coda Caption", serif; background: #dda0dd; } /* timeline */.timeline.timeline-word{ font-size: 80px; font-family: "Brush Script MT", serif; position: relative; left: 310px; width: 1000px; /*margin-right: -330px;*/ margin-top: 40px; }.timeline.timeline-content{ position: relative; left: 170px; top: 40px; font-family: Dosis, sans-serif; width: 800px; }.event-date-first-child, .event-date{ width: 120px; float: left; padding: 8px 12px 8px 8px; text-align: center; clear: left; border-top: 1px solid #ccc; font-weight: bold; }.event-des-first, .event-des{ width: 625px; float: left; background: #f9f9f9; padding: 8px 12px 8px 8px; border-top: 3px solid #ccc; border-left: 1px solid #ccc; border-right: 2px solid #ccc; line-height: 26px; } /* About */.about{ /*display: inline-block;*/ position: absolute; right: 150px; text-align: center; font-family: Dosis, sans-serif; }.about th img{ display: block; width: 270px; height: 210px; margin: 10px auto; border-radius: 15px; }.about #about-word{ font-size: 35px; font-family: "Montserrat", sans-serif; }.about th{ font-weight: bold; font-size: 15px; }.about td{ padding: 10px; background: #f9f9f9; border-bottom: 1px solid #ccc; font-size: 14px; width: 190px; } /* Footer */ html, body, .container{ min-height: 100%; }.content{ padding-bottom: 50px; }.footer{ margin-top: -50px; /*position: absolute;*/ height: 50px; clear: both; text-align: center; background: #dda0dd; font-size: 18px; padding-top: 18px; }</pre><pre class="snippet-code-html lang-html prettyprint-override"> &lt;:DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;Elon Musk&lt;/title&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Dosis;wght@400:700&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Coda+Caption:wght@800&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Montserrat&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2.family=Potta+One&amp;display=swap" rel="stylesheet"&gt; &lt;link href="helloworld:css" rel="stylesheet" type="text/css"&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;header class="header"&gt; &lt;nav&gt; &lt;ul&gt; &lt;li&gt; &lt;a href= "#introduction"&gt;Introduction&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#timeline"&gt;Timeline&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#about"&gt;About&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/header&gt; &lt;div class="introduction" id="introduction"&gt; &lt;hr&gt; &lt;br&gt; &lt;div class="Elon-Musk-photo"&gt; &lt;img src="https.//www.biography.com/.image/t_share/MTY2MzU3Nzk2OTM2MjMwNTkx/elon_musk_royal_society.jpg" alt="Elon Musk photo"&gt; &lt;/div&gt; &lt;div class="Name"&gt; &lt;h1&gt;Elon Musk&lt;/h1&gt; &lt;/div&gt; &lt;div class="introduction-description"&gt; &lt;p&gt; Elon Musk is a South African-born American entrepreneur and businessman who founded X,com in 1999 (which later became PayPal). SpaceX in 2002 and Tesla Motors in 2003, Musk became a multimillionaire in his late 20s when he sold his start-up company, Zip2. to a division of Compaq Computers, Musk made headlines in May 2012. when SpaceX launched a rocket that would send the first commercial vehicle to the International Space Station. He bolstered his portfolio with the purchase of SolarCity in 2016 and cemented his standing as a leader of industry by taking on an advisory role in the early days of President Donald Trump's administration, In January 2021. Musk reportedly surpassed Jeff Bezos as the wealthiest man in the world. &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="des2"&gt; &lt;h2&gt;The world's smartest and richest man,&lt;/h2&gt; &lt;/div&gt; &lt;div class="timeline" id="timeline"&gt; &lt;div class="timeline-word"&gt; &lt;h1&gt;Timeline&lt;/h1&gt; &lt;/div&gt; &lt;div class="timeline-content"&gt; &lt;div class="year"&gt; &lt;div class="event-date-first-child"&gt; &lt;p&gt;28 June 1971&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des-first child&gt;"&gt; &lt;p&gt;Musk was born on June 28, 1971, in Pretoria. South Africa, He is the son of Maye Musk, a model and dietitian from Regina, Saskatchewan, Canada, and Errol Musk, a South African electromechanical engineer. pilot and sailor.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1980&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;His parents were divorced in 1980,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1981&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;At the age of 10. he developed an interest in computing with the Commodore VIC-20 and taught himself computer programming, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1983&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;By the age of 12, Musk sold the code of a BASIC-based video game he created called Blastar, to a magazine called PC and Office Technology. for approximately $500,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;June 1989&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;At the age of 17, in June 1989, Elon Musk moved to Canada to attend Queen's University. avoiding mandatory service in the South African military, His plan was to go United States where he thought great things are possible. more than any other country. And it would be easy to get to the United States from Canada,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1992&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;He left Queen's University in 1992 to study business and physics at the University of Pennsylvania. and graduated with an undergraduate degree in economics and stayed for a second bachelor's degree in physics,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1995&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 1995, Musk and his brother, Kimbal, started Zip2. a web software company which developed and marketed an Internet city guide for the newspaper publishing industry. The company raised money from a small group of angel investors.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 1999&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Compaq acquired Zip2 for US$307 million in cash and US$34 million in stock options in February 1999. Musk received US$22 million for his 7 percent share from the sale,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;March 1999&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In March 1999. Musk co-founded X,com, an online financial services and e-mail payment company. with US$10 million from the sale of Zip2.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2000&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;X,com merged with Confinity. which had a money-transfer service called PayPal and Musk became the CEO and company's largest shareholder by owning 11.7% of shares. The merged company focused on the PayPal service and was later renamed PayPal. PayPal's early growth was driven mainly by a viral marketing campaign where new customers were recruited when they received money through the service, Musk met his first wife, Canadian author Justine Wilson. while both were students at Ontario's Queen's University. They married in 2000, Their first son, Nevada Alexander Musk. died of sudden infant death syndrome (SIDS) at the age of 10 weeks,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2000&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk was ousted in October 2000 from his role as CEO of PayPal (although he remained on the board) due to disagreements with other company leadership. notably over his desire to move PayPal's Unix-based infrastructure to Microsoft Windows, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2001&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2001, Musk conceptualized Mars Oasis, a project to land a miniature experimental greenhouse on Mars, containing food crops growing on Martian regolith. in an attempt to regain public interest in space exploration, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2001&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In October 2001, Musk travelled to Moscow with Jim Cantrell (an aerospace supplies fixer), and Adeo Ressi (his best friend from college). to buy refurbished Dnepr Intercontinental ballistic missiles (ICBMs) that could send the envisioned payloads into space; The group met with companies such as NPO Lavochkin and Kosmotras, however, according to Cantrell, Musk was seen as a novice and was consequently spat on by one of the Russian chief designers. and the group returned to the United States empty-handed,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In February 2002, the group returned to Russia to look for three ICBMs. bringing along Mike Griffin, Griffin had worked for the CIA's venture capital arm, In-Q-Tel, as well as NASA's Jet Propulsion Laboratory, and was just leaving Orbital Sciences. a maker of satellites and spacecraft, The group met again with Kosmotras; and were offered one rocket for US$8 million, however; this was seen by Musk as too expensive. Musk consequently stormed out of the meeting, On the flight back from Moscow. Musk realized that he could start a company that could build the affordable rockets he needed,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;May 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk founded Space Exploration Technologies, or SpaceX. in May 2002 with US$100 million of his early fortune. Musk became the chief executive officer (CEO) and chief technology officer (CTO). SpaceX develops and manufactures space launch vehicles with a focus on advancing the state of rocket technology, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In October 2002. PayPal was acquired by eBay for US$1,5 billion in stock. of which Musk received US$165 million, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;July 2003&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Tesla. Inc, (originally Tesla Motors) was incorporated in July 2003 by Martin Eberhard and Marc Tarpenning. who financed the company until the Series A round of funding,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2004&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife had 2 sons, twins. through in vitro fertilization, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 2004&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk led the Series A round of investment for Tesla in February 2004. joined Tesla's board of directors as its chairman, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2006&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife had other 3 sons, triplets. through in vitro fertilization, Musk provided the initial concept and financial capital for SolarCity. which was then co-founded in 2006 by his cousins Lyndon and Peter Rive, From 2006. SpaceX got various contracts from NASA to transport cargo and astronauts to the International Space Station,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2007&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Following the financial crisis in 2008 and after a series of escalating conflicts in 2007. Eberhard was ousted from the firm. Musk assumed leadership of the company as CEO and product architect.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2008&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife Justine were separated. They share custody of their five sons,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2010&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2008, Musk began dating English actress Talulah Riley, and in 2010. the couple married, In January 2012, Musk announced that he had ended his four-year relationship with Riley, tweeting to Riley. "It was an amazing four years. I will love you forever. You will make someone very happy one day," In July 2013. Musk and Riley remarried, In December 2014; Musk filed for a second divorce from Riley, however. the action was withdrawn, The media announced in March 2016 that divorce proceedings were again under way. this time with Riley filing for divorce from Musk. The divorce was finalized in late 2016,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2010&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2010, the Musk Foundation collaborated with SolarCity to donate a 25-kW solar power system to the South Bay Community Alliance's hurricane response center in Coden. Alabama,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2011&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In a 2011 interview. he said he hopes to send humans to Mars' surface within 10–20 years, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;July 2011&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt; In July 2011, the Musk Foundation donated US$250,000 towards a solar power project in Sōma, Japan. a city that had been recently devastated by a tsunami.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2012&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;The underlying motivation for funding both SolarCity and Tesla was to help combat global warming, In 2012, Musk announced that SolarCity and Tesla are collaborating to use electric vehicle batteries to smooth the impact of rooftop solar on the power grid. with the program going live in 2013,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;25 May 2012&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On May 25, 2012, the SpaceX's vehicle, Dragon docked with the International Space Station (ISS). making history as the first commercial company to launch and berth a vehicle to the International Space Station,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;By 2013. SolarCity was the second largest provider of solar power systems in the United States.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;May 2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk had been a supporter of the US political action committee (PAC) FWD,us. which was started by fellow high-profile entrepreneur Mark Zuckerberg and advocates for immigration reform, However, in May 2013. Musk publicly withdrew his support in protest of advertisements the PAC was running that supported causes like the Keystone Pipeline, Musk and other members. including David O, Sacks, pulled out. criticizing the strategy as "cynical," Musk further stated. "we shouldn't give in to the politics, If we give in to that. we'll get the political system we deserve,"&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;12 August 2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On August 12, 2013. Musk unveiled a concept for a high-speed transportation system incorporating reduced-pressure tubes in which pressurized capsules ride on an air cushion driven by linear induction motors and air compressors, The mechanism for releasing the concept was an alpha-design document that, in addition to scoping out the technology: outlined a notional route where such a transport system might be built. between the Greater Los Angeles Area and the San Francisco Bay Area,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2014&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2014. Musk announced that Tesla would allow its technology patents to be used by anyone in good faith in a bid to entice automobile manufacturers to speed up development of electric cars,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;17 June 2014&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On June 17, 2014, Musk committed to building a SolarCity advanced production facility in Buffalo, New York. that would triple the size of the largest solar plant in the United States, Musk stated the plant will be "one of the single largest solar panel production plants in the world." and it will be followed by one or more even bigger facilities in subsequent years, The Tesla Gigafactory 2 is a photovoltaic (PV) cell factory, leased by Tesla subsidiary SolarCity in Buffalo. New York. Construction on the factory started in 2014 and was completed in 2017,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;January 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In January 2015; Musk made a guest appearance playing himself on The Simpsons in an episode titled "The Musk Who Fell to Earth". the episode poked fun at many of Musk's ideas,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;January 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk donated US$10 million to the Future of Life Institute in January 2015. to run a global research program aimed at keeping artificial intelligence beneficial to humanity,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;June 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In June 2015. Musk announced a design competition for students and others to build Hyperloop pods to operate on a SpaceX-sponsored mile-long track in a 2015–2017 Hyperloop pod competition, The track was used in January 2017. and Musk also started building a tunnel,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;November 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In November 2015, Musk appeared in an episode of The Big Bang Theory, playing himself. volunteering at a soup kitchen with Wolowitz,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;December 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In December 2015, Musk announced the creation of OpenAI. a not-for-profit artificial intelligence (AI) research company. OpenAI aims to develop artificial general intelligence in a way that is safe and beneficial to humanity:&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="about" id="about"&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th colspan="2" id="about-word"&gt;About &lt;img src="https.//static.theceomagazine.net/wp-content/uploads/2018/10/15093202/elon-musk-1100x733,jpg" alt="Elon Musk photo"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Born &lt;/th&gt; &lt;td&gt; Elon Reeve Musk June 28, 1971 (age 49) Pretoria, South Africa &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Occupation &lt;/th&gt; &lt;td&gt; Entrepreneur, Industrial designer. Engineer &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Spouse(s) &lt;/th&gt; &lt;td&gt; &lt;p&gt;Justine Wilson (m; 2000. div. 2008)&lt;/p&gt; &lt;p&gt;Talulah Riley (m; 2010. div. 2012) (m; 2013. div; 2016)&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Children &lt;/th&gt; &lt;td&gt; 7 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Parents &lt;/th&gt; &lt;td&gt; &lt;p&gt;Errol Musk (father)&lt;/p&gt; &lt;p&gt;Maye Musk (mother)&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;footer class="footer"&gt; &lt;p&gt;&amp;copy; Copyright Created by Durian&lt;/p&gt; &lt;/footer&gt; &lt;/body&gt; &lt;/html&gt;</pre></div></div><p></p></div>

[英]The <div class=“container”> height does not fill the whole page even when html, body and div are set to height=100%

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 如何使靜態div以100%的高度占據頁面的一半 高度達到頁面高度的100%后,如何使html div垂直滾動? 這<div class="“container”">即使 html、body 和 div 設置為 height=100%,高度也不會填滿整個頁面</div><div id="text_translate"><p>我現在正在建立一個致敬頁面。 我一直在設置 html,body 和 height=100%,但是當我檢查它時,只有 HTML 和 body 標簽高度填滿了瀏覽器的整個頁面,而 div 元素沒有。 我認為這使我的時間線內容溢出。 我能知道我該如何解決嗎?</p><p> 另外,頁面沒有響應,我能知道我該如何解決這個問題嗎? 我是 HTML 和 css 的初學者,所以可能需要一些指導......提前謝謝。 </p><p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"><div class="snippet-code"><pre class="snippet-code-css lang-css prettyprint-override"> /* universal setting */ *{ padding: 0; margin: 0; } /* introduction */.introduction{ background: #f9f9f9; padding-bottom: 10px; }.Elon-Musk-photo img{ width: 110px; height: 110px; border-radius: 100%; float: left; margin: 0 20px 20px 20px; }.Name{ text-align: center; margin-bottom: 10px; }.introduction-description p{ font-size: 16px; }.des2 h2{ width: 100%; text-align: center; font-size: 30px; font-family: "Coda Caption", serif; background: #dda0dd; } /* timeline */.timeline.timeline-word{ font-size: 80px; font-family: "Brush Script MT", serif; position: relative; left: 310px; width: 1000px; /*margin-right: -330px;*/ margin-top: 40px; }.timeline.timeline-content{ position: relative; left: 170px; top: 40px; font-family: Dosis, sans-serif; width: 800px; }.event-date-first-child, .event-date{ width: 120px; float: left; padding: 8px 12px 8px 8px; text-align: center; clear: left; border-top: 1px solid #ccc; font-weight: bold; }.event-des-first, .event-des{ width: 625px; float: left; background: #f9f9f9; padding: 8px 12px 8px 8px; border-top: 3px solid #ccc; border-left: 1px solid #ccc; border-right: 2px solid #ccc; line-height: 26px; } /* About */.about{ /*display: inline-block;*/ position: absolute; right: 150px; text-align: center; font-family: Dosis, sans-serif; }.about th img{ display: block; width: 270px; height: 210px; margin: 10px auto; border-radius: 15px; }.about #about-word{ font-size: 35px; font-family: "Montserrat", sans-serif; }.about th{ font-weight: bold; font-size: 15px; }.about td{ padding: 10px; background: #f9f9f9; border-bottom: 1px solid #ccc; font-size: 14px; width: 190px; } /* Footer */ html, body, .container{ min-height: 100%; }.content{ padding-bottom: 50px; }.footer{ margin-top: -50px; /*position: absolute;*/ height: 50px; clear: both; text-align: center; background: #dda0dd; font-size: 18px; padding-top: 18px; }</pre><pre class="snippet-code-html lang-html prettyprint-override"> &lt;:DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;Elon Musk&lt;/title&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Dosis;wght@400:700&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Coda+Caption:wght@800&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2:family=Montserrat&amp;display=swap" rel="stylesheet"&gt; &lt;link href="https.//fonts.googleapis?com/css2.family=Potta+One&amp;display=swap" rel="stylesheet"&gt; &lt;link href="helloworld:css" rel="stylesheet" type="text/css"&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;header class="header"&gt; &lt;nav&gt; &lt;ul&gt; &lt;li&gt; &lt;a href= "#introduction"&gt;Introduction&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#timeline"&gt;Timeline&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#about"&gt;About&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/header&gt; &lt;div class="introduction" id="introduction"&gt; &lt;hr&gt; &lt;br&gt; &lt;div class="Elon-Musk-photo"&gt; &lt;img src="https.//www.biography.com/.image/t_share/MTY2MzU3Nzk2OTM2MjMwNTkx/elon_musk_royal_society.jpg" alt="Elon Musk photo"&gt; &lt;/div&gt; &lt;div class="Name"&gt; &lt;h1&gt;Elon Musk&lt;/h1&gt; &lt;/div&gt; &lt;div class="introduction-description"&gt; &lt;p&gt; Elon Musk is a South African-born American entrepreneur and businessman who founded X,com in 1999 (which later became PayPal). SpaceX in 2002 and Tesla Motors in 2003, Musk became a multimillionaire in his late 20s when he sold his start-up company, Zip2. to a division of Compaq Computers, Musk made headlines in May 2012. when SpaceX launched a rocket that would send the first commercial vehicle to the International Space Station. He bolstered his portfolio with the purchase of SolarCity in 2016 and cemented his standing as a leader of industry by taking on an advisory role in the early days of President Donald Trump's administration, In January 2021. Musk reportedly surpassed Jeff Bezos as the wealthiest man in the world. &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="des2"&gt; &lt;h2&gt;The world's smartest and richest man,&lt;/h2&gt; &lt;/div&gt; &lt;div class="timeline" id="timeline"&gt; &lt;div class="timeline-word"&gt; &lt;h1&gt;Timeline&lt;/h1&gt; &lt;/div&gt; &lt;div class="timeline-content"&gt; &lt;div class="year"&gt; &lt;div class="event-date-first-child"&gt; &lt;p&gt;28 June 1971&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des-first child&gt;"&gt; &lt;p&gt;Musk was born on June 28, 1971, in Pretoria. South Africa, He is the son of Maye Musk, a model and dietitian from Regina, Saskatchewan, Canada, and Errol Musk, a South African electromechanical engineer. pilot and sailor.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1980&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;His parents were divorced in 1980,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1981&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;At the age of 10. he developed an interest in computing with the Commodore VIC-20 and taught himself computer programming, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1983&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;By the age of 12, Musk sold the code of a BASIC-based video game he created called Blastar, to a magazine called PC and Office Technology. for approximately $500,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;June 1989&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;At the age of 17, in June 1989, Elon Musk moved to Canada to attend Queen's University. avoiding mandatory service in the South African military, His plan was to go United States where he thought great things are possible. more than any other country. And it would be easy to get to the United States from Canada,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1992&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;He left Queen's University in 1992 to study business and physics at the University of Pennsylvania. and graduated with an undergraduate degree in economics and stayed for a second bachelor's degree in physics,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;1995&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 1995, Musk and his brother, Kimbal, started Zip2. a web software company which developed and marketed an Internet city guide for the newspaper publishing industry. The company raised money from a small group of angel investors.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 1999&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Compaq acquired Zip2 for US$307 million in cash and US$34 million in stock options in February 1999. Musk received US$22 million for his 7 percent share from the sale,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;March 1999&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In March 1999. Musk co-founded X,com, an online financial services and e-mail payment company. with US$10 million from the sale of Zip2.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2000&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;X,com merged with Confinity. which had a money-transfer service called PayPal and Musk became the CEO and company's largest shareholder by owning 11.7% of shares. The merged company focused on the PayPal service and was later renamed PayPal. PayPal's early growth was driven mainly by a viral marketing campaign where new customers were recruited when they received money through the service, Musk met his first wife, Canadian author Justine Wilson. while both were students at Ontario's Queen's University. They married in 2000, Their first son, Nevada Alexander Musk. died of sudden infant death syndrome (SIDS) at the age of 10 weeks,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2000&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk was ousted in October 2000 from his role as CEO of PayPal (although he remained on the board) due to disagreements with other company leadership. notably over his desire to move PayPal's Unix-based infrastructure to Microsoft Windows, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2001&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2001, Musk conceptualized Mars Oasis, a project to land a miniature experimental greenhouse on Mars, containing food crops growing on Martian regolith. in an attempt to regain public interest in space exploration, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2001&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In October 2001, Musk travelled to Moscow with Jim Cantrell (an aerospace supplies fixer), and Adeo Ressi (his best friend from college). to buy refurbished Dnepr Intercontinental ballistic missiles (ICBMs) that could send the envisioned payloads into space; The group met with companies such as NPO Lavochkin and Kosmotras, however, according to Cantrell, Musk was seen as a novice and was consequently spat on by one of the Russian chief designers. and the group returned to the United States empty-handed,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In February 2002, the group returned to Russia to look for three ICBMs. bringing along Mike Griffin, Griffin had worked for the CIA's venture capital arm, In-Q-Tel, as well as NASA's Jet Propulsion Laboratory, and was just leaving Orbital Sciences. a maker of satellites and spacecraft, The group met again with Kosmotras; and were offered one rocket for US$8 million, however; this was seen by Musk as too expensive. Musk consequently stormed out of the meeting, On the flight back from Moscow. Musk realized that he could start a company that could build the affordable rockets he needed,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;May 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk founded Space Exploration Technologies, or SpaceX. in May 2002 with US$100 million of his early fortune. Musk became the chief executive officer (CEO) and chief technology officer (CTO). SpaceX develops and manufactures space launch vehicles with a focus on advancing the state of rocket technology, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;October 2002&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In October 2002. PayPal was acquired by eBay for US$1,5 billion in stock. of which Musk received US$165 million, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;July 2003&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Tesla. Inc, (originally Tesla Motors) was incorporated in July 2003 by Martin Eberhard and Marc Tarpenning. who financed the company until the Series A round of funding,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2004&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife had 2 sons, twins. through in vitro fertilization, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;February 2004&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk led the Series A round of investment for Tesla in February 2004. joined Tesla's board of directors as its chairman, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2006&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife had other 3 sons, triplets. through in vitro fertilization, Musk provided the initial concept and financial capital for SolarCity. which was then co-founded in 2006 by his cousins Lyndon and Peter Rive, From 2006. SpaceX got various contracts from NASA to transport cargo and astronauts to the International Space Station,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2007&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Following the financial crisis in 2008 and after a series of escalating conflicts in 2007. Eberhard was ousted from the firm. Musk assumed leadership of the company as CEO and product architect.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2008&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk and his wife Justine were separated. They share custody of their five sons,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2010&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2008, Musk began dating English actress Talulah Riley, and in 2010. the couple married, In January 2012, Musk announced that he had ended his four-year relationship with Riley, tweeting to Riley. "It was an amazing four years. I will love you forever. You will make someone very happy one day," In July 2013. Musk and Riley remarried, In December 2014; Musk filed for a second divorce from Riley, however. the action was withdrawn, The media announced in March 2016 that divorce proceedings were again under way. this time with Riley filing for divorce from Musk. The divorce was finalized in late 2016,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2010&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2010, the Musk Foundation collaborated with SolarCity to donate a 25-kW solar power system to the South Bay Community Alliance's hurricane response center in Coden. Alabama,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2011&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In a 2011 interview. he said he hopes to send humans to Mars' surface within 10–20 years, &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;July 2011&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt; In July 2011, the Musk Foundation donated US$250,000 towards a solar power project in Sōma, Japan. a city that had been recently devastated by a tsunami.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2012&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;The underlying motivation for funding both SolarCity and Tesla was to help combat global warming, In 2012, Musk announced that SolarCity and Tesla are collaborating to use electric vehicle batteries to smooth the impact of rooftop solar on the power grid. with the program going live in 2013,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;25 May 2012&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On May 25, 2012, the SpaceX's vehicle, Dragon docked with the International Space Station (ISS). making history as the first commercial company to launch and berth a vehicle to the International Space Station,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;By 2013. SolarCity was the second largest provider of solar power systems in the United States.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;May 2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk had been a supporter of the US political action committee (PAC) FWD,us. which was started by fellow high-profile entrepreneur Mark Zuckerberg and advocates for immigration reform, However, in May 2013. Musk publicly withdrew his support in protest of advertisements the PAC was running that supported causes like the Keystone Pipeline, Musk and other members. including David O, Sacks, pulled out. criticizing the strategy as "cynical," Musk further stated. "we shouldn't give in to the politics, If we give in to that. we'll get the political system we deserve,"&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;12 August 2013&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On August 12, 2013. Musk unveiled a concept for a high-speed transportation system incorporating reduced-pressure tubes in which pressurized capsules ride on an air cushion driven by linear induction motors and air compressors, The mechanism for releasing the concept was an alpha-design document that, in addition to scoping out the technology: outlined a notional route where such a transport system might be built. between the Greater Los Angeles Area and the San Francisco Bay Area,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;2014&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In 2014. Musk announced that Tesla would allow its technology patents to be used by anyone in good faith in a bid to entice automobile manufacturers to speed up development of electric cars,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;17 June 2014&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;On June 17, 2014, Musk committed to building a SolarCity advanced production facility in Buffalo, New York. that would triple the size of the largest solar plant in the United States, Musk stated the plant will be "one of the single largest solar panel production plants in the world." and it will be followed by one or more even bigger facilities in subsequent years, The Tesla Gigafactory 2 is a photovoltaic (PV) cell factory, leased by Tesla subsidiary SolarCity in Buffalo. New York. Construction on the factory started in 2014 and was completed in 2017,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;January 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In January 2015; Musk made a guest appearance playing himself on The Simpsons in an episode titled "The Musk Who Fell to Earth". the episode poked fun at many of Musk's ideas,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;January 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;Musk donated US$10 million to the Future of Life Institute in January 2015. to run a global research program aimed at keeping artificial intelligence beneficial to humanity,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;June 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In June 2015. Musk announced a design competition for students and others to build Hyperloop pods to operate on a SpaceX-sponsored mile-long track in a 2015–2017 Hyperloop pod competition, The track was used in January 2017. and Musk also started building a tunnel,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;November 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In November 2015, Musk appeared in an episode of The Big Bang Theory, playing himself. volunteering at a soup kitchen with Wolowitz,&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="year"&gt; &lt;div class="event-date"&gt; &lt;p&gt;December 2015&lt;/p&gt; &lt;/div&gt; &lt;div class="event-des"&gt; &lt;p&gt;In December 2015, Musk announced the creation of OpenAI. a not-for-profit artificial intelligence (AI) research company. OpenAI aims to develop artificial general intelligence in a way that is safe and beneficial to humanity:&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="about" id="about"&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th colspan="2" id="about-word"&gt;About &lt;img src="https.//static.theceomagazine.net/wp-content/uploads/2018/10/15093202/elon-musk-1100x733,jpg" alt="Elon Musk photo"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Born &lt;/th&gt; &lt;td&gt; Elon Reeve Musk June 28, 1971 (age 49) Pretoria, South Africa &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Occupation &lt;/th&gt; &lt;td&gt; Entrepreneur, Industrial designer. Engineer &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Spouse(s) &lt;/th&gt; &lt;td&gt; &lt;p&gt;Justine Wilson (m; 2000. div. 2008)&lt;/p&gt; &lt;p&gt;Talulah Riley (m; 2010. div. 2012) (m; 2013. div; 2016)&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Children &lt;/th&gt; &lt;td&gt; 7 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt; Parents &lt;/th&gt; &lt;td&gt; &lt;p&gt;Errol Musk (father)&lt;/p&gt; &lt;p&gt;Maye Musk (mother)&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;footer class="footer"&gt; &lt;p&gt;&amp;copy; Copyright Created by Durian&lt;/p&gt; &lt;/footer&gt; &lt;/body&gt; &lt;/html&gt;</pre></div></div><p></p></div> DIV - 強制高度100%= / =頁面高度? 僅100%高度的填充頁面 當導航欄到達頁面頂部時,我的粘性標頭會導致隨后的div跳到100像素左右,無法找出解決方法嗎? 如何將最小高度設置為查看屏幕的100%和頁面的一半? 即使我的CSS已將JQuery Mobile OSM div的高度自動設置為0%, 每當頁面到達特定點時如何更改div的寬度或高度 HTML / CSS:划分100%的頁面高度
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM