Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>Bean Facts</h1>
<div style="text-align:center">
  <a class="button" href="#popup1">garbanzo beans</a>
  <div id="popup1" class="overlay">
    <div class="popup">
      <h2>The Garbonzo Bean<br>(also named the chickpeas)</h2>
      <a class="close" href="#">&times;</a>
      <div class="content">
        <p>There is strong evidence that chickpeas were first cultivated in the Middle East a staggering 7500 years BC. The popularity of the chickpea quickly spread all over the world, and they were soon grown and consumed in many ancient civilisations such as Egypt, Greece and Rome.
  Chickpeas are known by many different names all over the world. Other names include garbanzo beans, a popular term in the US, bengal grams, egyptian peas, ceci beans and kabuli chana. Chickpeas come in a variety of different types and colours, not just the beige variety we are used to seeing in cans. Chickpeas can also be black, green, red and brown.</p>
        <p>Chickpeas are an agricultural wonder. Not only do chickpeas produce a valuable crop but at the same time they also provide a natural organic method of breaking the disease cycle in wheat and barley crops. This means less fungicide and less insecticide, resulting in a cleaner, greener environment. Pretty amazing.</p>
        <p>Legumes are included in the Australian Government recommended eating plan for a balanced diet in two categories! Legumes and beans are categorised with both vegetables and meat, making legumes an important part of a healthy balanced diet. For more information on recommended daily servings, visit our health centre: <a href="http://local.happysnackcompany/health-centre/importance-balanced-diet/">Importance of balanced diet</a></p>
        <p>These clever little plants actually restore depleted soils and are powerful nitrogen fixing legumes. Their deep root system plays an important role in stabilising soils and preventing erosion, they may use little or no fertiliser while enhancing the fertility of the soil, and, they are a dry land agricultural crop, using no agricultural water. To add to their incredible talents, the chickpea plant even has a natural insecticide in its leaves, which keeps the bugs away. Incredible stuff!</p>
         <p>Chickpeas are a great source of both soluble and dietary fibre, important for maintaining a healthy digestive system. Soluble fibre may assist with reducing the absorption of cholesterol into the bloodstream and helps maintain blood sugar levels, which may help to reduce the risk of developing heart disease and also aid in managing diabetes. The dietary fibre in chickpeas and their low glycemic index (GI) may also assist with weight loss by making you feel fuller for longer.</p>
         <p>Chickpeas are an incredibly versatile ingredient to cook with. You can eat them canned, dried or roasted, hot or cold and they are inexpensive. Chickpeas can be used for making much, much more than just good old hummus. Try adding to soups instead of croutons, salads and stir frys for extra crunch, make delicious meat free patties or make a tomato chickpea stew to have with your Sunday bacon and eggs. There’s a plethora of chickpea recipes out there just waiting for you to discover.</p>
          <p>Ground chickpeas have been used as a coffee substitute since the 18th century and are still commonly used as a caffeine-free alternative today. Widely available, the taste is said to be delicious – why not give it a go!</p>
          <p>Chickpeas contain a huge number of antioxidants, vitamins and minerals including folate, magnesium, vitamin b6, vitamin c, iron, potassium, calcium, phosphorus and zinc. They are also high in protein so are a fantastic alternative to meat for vegetarians.</p>
          <p>India is the world’s number one leader in chickpea production, with a staggering 8,832,500 metric tons reportedly produced in 2013. Interestingly, the country coming in second place was Australia! With 813,300 tons produced in the same year. “Production of chickpea by countries” UN Food & Agriculture Organisation 2014.</p>
        <div id="bean1"></div>
        </div>
      </div>
    </div>
    <a class="button" href="#popup2">black beans </a>
    <div id="popup2" class="overlay">
	    <div class="popup">
		    <h2>black beans </h2>
        <a class="close" href="#">&times;</a>
        <div class="content"> 
          <p>Black beans are botanically known as Phaseolus vulgaris.</p>
          <p>Beans and legumes are the fruits or seeds of a family of plants called Fabaceae (also called Leguminosae).</p>
          <p>Black beans have several common names including turtle beans, caviar criollo and frijoles negros.</p>
          <p>These beans were and still are a staple food in the diets of Central and South Americans, dating back at least 7,000 years.</p>
          <p>Black beans have a satiny black skin (technically dark purple) and a white center.</p>
          <p>When cooked, the beans have a creamy texture and slightly sweet flavor.</p>
          <p>Black beans are an excellent low-calorie, low-fat source of energy and fiber.</p>
          <p>One half-cup serving of black beans gives you 8 grams of protein. Aside from meat products, dry beans are the highest source of protein available.</p>
          <p>Dry beans have more fiber than any other unprocessed food at 15 grams per cup.</p>
          <p>One cup of cooked black beans contains less than 1 gram of fat and only 227 calories.</p>
          <p>Black beans are also a great source of folic acid, magnesium, potassium and iron.</p>
          <p>.Adding black beans to your breakfast food will also help your mood because it helps to stabilize your blood sugar. This means that including beans in your breakfast or lunch can help prevent that mid-afternoon slump.</p>
          <p>Michigan is the leading producer of black beans, with 58% of the nation’s total production.</p>
          <p>Michigan’s Thumb counties, known for its rich farmland, produces more beans than any other place in the state.</p>
          <p>Huron County is one of the top dry bean-producing counties in the nation.</p>
          <p>Mexico is Michigan’s largest export market for dry beans, especially black beans.</p>
          <div id="black_bean"></div>
        </div>
	     </div>
      </div> 
      <a class="button" href="#popup3">lima beans</a>
      <div id="popup3" class="overlay">
	      <div class="popup">
          <h2>Lima Beans</h2>
		      <p>Lima bean is herbaceous plant that belongs to the legume family. It originates from Central and South America, but it can be found in areas with subtropical and tropical climate around the world today. Lima bean grows on fertile, loamy, well-drained soil, on the altitude of up to 6.660 feet, exposed to direct sunlight. Cultivation of lima bean started 6.000 years BC in South America. Lima bean is still very popular and frequently cultivated because of its excellent nutritional value and pleasant, creamy taste. Lima bean can grow in the form of bush (up to 2 feet in height) or vine (up to 12 feet in height). Varieties that grow in the form of bush reach maturity earlier, but they are more sensitive to diseases and pests.</p>
            <p>Lima bean has green, compound leaves that consist of three large, heart-shaped leaflets. Lima bean produces white or yellowish flowers with both types of reproductive organs (perfect flowers). Flowers contain large quantities of nectar which attracts honey bees, main pollinators of this plant. When natural pollinators are not available, flowers perform self-pollination.</p>
            <p>Fruit of lima bean are green pods filled with oval or kidney-shaped, flattened beans.</p>
            <p>Beans can be white, creamy or green colored. They are usually covered with reddish-brown markings. All varieties of lima bean can be divided in three major groups, based on the size of beans: dwarf, small ("Sieva type") and large ("lima type").</p>
            <p>Lima bean reaches maturity 65 to 95 days after sowing. One hectare of lima beans produces 6.400 to 11.000 pounds of beans per year.
When lima bean became popular in North America and Europe, it was often transported from South America in boxes marked with "Lima, Peru", to inform recipients on the origin of food. That's how it earned its name.</p>
            <p>Scientific name of lima bean is "Phaseoulus lunatus". Name refers to the shape of bean, which looks like half-moon (lunatus = crescent-shaped, in Latin).</p>
          <p>Lima bean is also known as "butterbeans" due to taste of cooked beans which resembles butter.</p>
          <p>Lima bean is rich source of dietary fibers, proteins, vitamins of the B group and minerals such as molybdenum, magnesium, manganese and iron</p>
          <p>Lima beans need to be cooked before consumption, to ensure degradation of cyanide glycosides (group of harmful compounds).</p>
          <p>Lima bean is available in fresh, dried and canned form. It can be used for the preparation of soups, casseroles, paellas and stews.</p>
          <p>Lima bean is very popular in the USA where an average citizen consumes 0.3 pounds of lima bean per year.</p>
          <p>Thanks to high content of dietary fibers, lima bean can prevent constipation, regulate blood sugar level and reduce blood cholesterol level.</p>
          <p>Lima bean is perennial plant (lifespan: more than 2 years), but it is often cultivated as annual plant (lifespan: one year).</p>
    <div id="lima_bean"></div>
		<a class="close" href="#">&times;</a>
		<div class="content"> 

		</div>
	</div>
</div>
</div>
              
            
!

CSS

              
                
body{
  padding:40px;
}
h1{
  text-align:center;
  padding:0 0 30px;
}
.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}
p{
  text-align:left;
  padding:0 20px;
}
.button {
  font-size: 1em;
  padding: 15px 30px;
  color: white;
  margin:20px;
  background:green;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
  text-transform:uppercase;
  display:inline-block;
   width:220px;
}


.overlay {
  Overflow:scroll;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}

.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}


.button:hover {
  background: #06D85F;
}

.overlay {
  Overflow:scroll;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}
#black_bean{ background:url(https://img.apmcdn.org/161cd099e172649bc2bb61bea56229b0f780670d/uncropped/822f90-splendid-table-blackbeansistockphoto.jpg);
  width:100%;
  height:400px;
  background-size:cover;
  background-position:top;
}
#lima_bean{ background:url(https://food.fnr.sndimg.com/content/dam/images/food/fullset/2013/2/25/1/YW0210H_Baby-Lima-Beans_s4x3.jpg.rend.hgtvcom.616.462.suffix/1371614348577.jpeg);
  width:100%;
  height:400px;
  background-size:cover;
  background-position:top;
}
#bean1{
  background:url("https://images.cutco.com/learn/2018/Chickpeas-l.jpg");
  width :100%;
  height :200px;
  background-size:cover;
}
              
            
!

JS

              
                
              
            
!
999px

Console