How Much Is 3 4 Cup?

 

Knowing how much is 3 4 cup can be confusing. It’s normal to measure something in a cup and then use the other measurement system to convert it to the proper volume. For example, if you’re measuring a quart of coffee, you’ll use a quart, which is equivalent to three cups. Then, you’ll convert that volume to ounces and vice versa. This is one of the most common and accurate ways to make a conversion.

In the United States, 3/4 cup equals 2 fluid ounces, which is approximately 15 ml. To measure a tablespoon, fill one cup with the substance you’d like to measure, then pour half of it into a separate cup. You can also measure 1/4 cup by taking half of it and then adding it to the other. To convert 3/4 cup to ounces, simply divide it by two. You can use the proportions for 1 tablespoon. However, this method does not work for a teaspoon, which has 15 ml.

Another way to measure a quarter cup is to take a tablespoon and pour it into a second cup. A third cup is equal to 0.7 fluid ounces. It is important to note that a single tablespoon is equivalent to 15 ml. You can use the same method to measure a quart. If you have a liquid that is a solid, you can add it up to get the desired volume.

To calculate the volume of a fraction, measure a quarter-cup. A fourth cup is equal to two teaspoons. Then, divide that number by four to find the volume of one-quarter cup. This method is most accurate for measuring liquids. A quart is equal to 3 qt. You can divide the number by two to get the volume of a quart. Once you’ve calculated the amount of a cup, use the percentages to make it more precise.

A quarter-cup is equal to three quarters of a cup. A third-quarter-cup is equal to a half-cup. A fourth-cup is equal to two-thirds of a pint. A fifth-cup is equal to a fifth-cup. It is the same as a fourth-cup. This unit is not exactly a quarter-cup. So, a quart is equivalent to three-quarters of a cup.

To measure the quantity of a quarter-cup, measure it in tablespoons. In other words, a tablespoon is 15 ml, and a half-cup is 16 ml. A cup is equal to one-half of a quart. A quart is three-quarters of a qt. A tablespoon is eight teaspoons, while a full quarter is three-quarters of a quarter-cup.

Alternatively, a third-cup is equal to half-acup. A quarter-cup is equal to one quart. A quarter-cup of something is equivalent to two-thirds of a cup. It’s also equal to a quarter-cup, while a half-cup is equal to one-half of a tablespoon. The same applies for a fifth-cup. A sixth-cup is equivalent to a fourth-cup.

Depending on your needs, 3/4 cup is the same as one-quarter quart. Moreover, a fourth-cup is equal to four-half quart. A half-cup is equal to two-quarters of a quarter-cup. A cup is equal to one-half of a fluid-ounce. This is the same as a quarter-cup and a half-cup. When measuring the volume of a quarter-cup, the third-cup is the same as two-thirds of a liter.

As a rule, a third-cup is equal to three-quarters of a cup. A quarter-cup is equal to three-quarters-of-a-cup. A fourth-cup is equal to a half-cup plus an eighth-cup. Using a tablespoon to measure a cup is equivalent to one-fourth of a quart. This means that a quarter-cup is equivalent to one-half of a quart.

Using a metric system, a cup contains three thirds. When you use a fraction of a cup, a third-cup is the same as three-fourths-cup. When you divide a quarter-cup by two-thirds-cup, you’ll get the equivalent of one-fourth-cup. The same rule applies to half-cup-to-cup. If you want to make a recipe in a specific metric, then you’ll need to double the measurements.

How to Choose the Best Linux Mail Server

 

If you’re looking for the best Linux mail server, there are many options available. Consider what features you need and what power level you need. Different systems come with different power levels, and you’ll need to decide what’s important to you. Some of the best mail servers offer free trial periods, which are an excellent way to try them out before you purchase. But if you’re running a business and need a powerful and robust email solution, you’ll want to pay a little bit more for a premium service.

When choosing a Linux mail server, be sure to read reviews of different servers. This will help you make an informed decision. Also, be sure to look for information about the features of different Mail Servers, since people have different needs. Check out the cost and features of each Mailing Service, and choose a plan that meets your needs. You’ll be glad you did. If you’re unsure about the type of server to buy, start with the free version of Sendmail.

The best Linux mail server isn’t necessarily the cheapest. A more expensive dedicated server can be reliable. Compare several options and see which one suits your budget and needs best. Whether you’re running a small business or a large corporation, it’s important to choose the right one. You don’t want to end up with a substandard email server that doesn’t work for you. In addition, the best Linux mail server reviews will also tell you how to use it for your business.

The best Linux mail server will depend on your company’s needs. While the cheapest option may be tempting, a dedicated server will be more reliable. Be sure to read more than just reviews before making a decision. Ask if anyone else has used the software you’re interested in. Visiting a Linux hosting company’s website and checking out their reputation before buying will ensure your satisfaction. Then, try out the various features and see what works best for you.

If you’re looking for the best Linux mail server, you’ll need to check its security and ease of use. The most secure and dependable are the two most important factors to consider. You don’t want to end up with a server that’s not safe to use. You want a trustworthy server that will last for years. If you’re buying a Linux mail service, it’s important to do your research first.

The best Linux mail server you buy will depend on your company’s requirements. You should avoid unreliable companies when you’re purchasing a Linux email server. Always check the reviews online before purchasing your server. In addition to the features, a good email server should be easy to install and manage. If you’re planning to use your server for business purposes, you should try it out. But be sure to check the reliability of the company you’re buying from.

A Linux mail server can be very useful for a business that uses email to send and receive files. It can also save energy and power. In addition to being free to download, it’s a free operating system, so you’ll be happy with the benefits it offers. So, look for the best Linux mail server for your business. You’ll be glad you did! So, go ahead and choose the right one for your needs!

The best Linux mail server will meet the needs of your company. It will be free to download and run on almost any type of computer. However, you need to be careful not to buy an email server from a company that doesn’t have a good reputation. A Linux mail server is a great option for businesses. When you’re not sure what kind of email your business needs, use a Linux mail server. If you’re running an online business, the best Linux mail server is the one that’s free and open source.

It’s also important to consider the size of your company. The best Linux mail server will handle thousands of emails per day and will fit the needs of your team. Whether you need a private or shared email server, a Linux mail server will be the perfect solution for your needs. You’ll be able to manage the number of emails without any hassles. The best Linux mail server will meet your needs and keep them safe.

How Much Does A Roof Cost? – 10 Things To Ask Before Answering Roofing Questions

 

If you require roofing services in Auckland, then obviously you must know how to locate an experienced and dependable Auckland roofer who can provide you with quality products and high-quality workmanship. It is extremely important to understand that it is not an easy thing to just buy a new roof to replace that which has been damaged. You will want to obtain a roof that is designed to withstand the harsh weather conditions of Auckland and New Zealand. When choosing a roof for your house or commercial premises, you will want to select the one that will give you years of trouble free service and a product that will meet all of your requirements. To begin the search for an experienced roofer in Auckland simply contact one of the many professional roofing specialists in Auckland.

When looking to hire a roofing company in Auckland, it’s always best to do your homework. Many people often make the mistake of only seeking out a company after they have had some previous experience with them. This could prove to be extremely detrimental to you and your new roof. Always ensure you research all companies in the area before making any decisions, always ask previous clients if they would recommend them and also check out online reviews so that you can get a feel for how good or bad the service has been.

The best Auckland roofers are going to be experts in all aspects of roofing services. They will use the latest technology and equipment to provide you with the highest quality workmanship. If they do not have all of this then they will not be very reputable. By doing some initial research online you can quickly determine if a particular company has any negative comments or has been contacted by the Better Business Bureau.

Once you have an idea of what your ceiling problem is going to be and the best course of action to fix it, the next step is to speak to your roofer. A quality Auckland roofer will come to your house with the intention of completing the roof repair work as fast as possible and within the most cost effective way. They will offer you a free quote, usually on the day, and will then start work right away. A good contractor should also provide you with photos of previous work that they have completed.

The best roofing contractor in Auckland will offer a guarantee on their work, which is far superior to what you would receive if you attempted to complete the repair work yourself. A reputable Auckland roofing contractor will ensure that they use the best materials and employ quality workmanship to ensure that their work is of the highest standard. Ask for some examples of previous work that they have completed. A quality business will be happy to provide you with these.

You can always check out the websites of existing roofing companies and obtain information from there. If you are satisfied with what you read, contact each potential roofing company that you are considering hiring. Inform them of your interest in using their services, give them a short description of your project, and ask them questions relating to their own experience with other contractors in the city. It is always worthwhile asking questions about previous jobs that they have completed. If they are unable to provide you with feedback, or answer you questions in a satisfactory manner, then you may want to consider moving onto another company.

Another good way to find out how much does a new roof cost is to speak to your neighbours and friends, and get estimates from them. Asking people that you know will help you build up some knowledge about the average cost of having the work completed on your roof. If you feel that your friends and neighbours are not offering accurate estimates, then arranging estimates with a roofer in Auckland is a good alternative.

The last, but certainly not the least, is to ask your real estate agent. An Auckland roofer – 10 things to ask before agreeing to a quote or estimate, is very likely to tell you that if you are planning on building a new roof at your home, then it is usually a good idea to get a quote from a professional roofer as soon as possible. You can also check with your accountant or tax adviser, as these professionals typically have a good understanding of the tax laws in New Zealand concerning the types of work that need to be performed on a new roof.

Double Glazed Windows – Why They Are A Good Choice For Your Home

 

Double glazed windows, also known as double-paned windows, are the preferred choice in New Zealand for protecting the property from the risks of the global recession. These windows were found to be highly effective in combating the adverse effects of the recession, but only when New Zealand’s stringent building regulations were applied to them. Now that regulations have relaxed, these windows are proving their worth all over again.

The double glazed windows, also known as honeycomb panes, were first introduced onto New Zealand houses twenty-five years ago. The main attraction of these windows is the energy savings they produce. In addition, they are highly secure for both home and commercial use because they feature two panes of glass, rather than just one. The result is that two panes provide a higher level of insulation than single panes. As a result, double glazed windows help keep the heating and cooling costs down, while maintaining high levels of security for homes and businesses.

In terms of installing the new retrofit double glazed windows in your home or business, there are a few things that you need to keep in mind. First, you need to ensure that you have sufficient openings for the windows to open fully. Ideally, you should have between three and six inches of space between the panes of glass on each side. If you don’t have adequate space, then the windows won’t be able to open fully, and will therefore not be able to protect you and your property adequately from the elements. However, if you do have enough space, then you can easily install double glazed windows on the inner and outer panes of the glass, providing maximum protection.

After you have maximized the amount of space available for installation of the windows, then it is time to find a company that can manufacture these windows, so you don’t have to purchase them yourself. There are quite a few companies who produce and supply these windows, including the major players in the window industry such as British Home furnishing and UHP plc. However, before choosing a company to do business with, it is important that you do your research properly. You should ask for quotes from as many different companies as possible, and take an account of what you hear back from them.

When it comes to choosing double glazed windows, it is important to remember that not all materials are ideal for these windows. For instance, UPVC (unplasticized polyvinyl chloride) windows are more expensive than standard glass, and they are also more difficult to install. Due to these factors, UPVC windows are not recommended for domestic or commercial purposes where security is an issue, such as in homes. Double glazed windows on the other hand are ideal for commercial and domestic purposes because they provide greater strength and security, as well as higher resistance to heat transfer.

In terms of price, double glazing NZ retailers will often quote one-off prices for their products. These can sometimes be significantly higher than regular windows, but they are generally cheaper than UPVC. As a result, it may be a good idea to invest some money in these windows and then use a company that can offer an installation service to ensure that they are installed properly. However, if you are interested in buying these windows, and don’t want to hire someone to do the installation for you, then there are many online stores where you can buy them and have them sent to your door.

Before you start looking for double glazed windows, it is a good idea to check out what the current market has to offer. In particular, there are many different styles of these windows, and it is important to understand the differences between them. This will help you to choose the style of double-glazed windows that best suits your requirements. In addition to this, it’s important to find a reputable company that is experienced in manufacturing these windows. As well as ensuring that they are manufactured to high quality standards, it is also important to ensure that they are installed correctly. The correct installation will not only improve the security and safety of your home, but it will also make it much more energy efficient.

When choosing double glazed windows NZ, it is important to consider whether you want to purchase windows that incorporate tempered glass or air-tightness. Tempered glass is used in many window options because it has a number of benefits. Firstly, it is stronger than standard windows, which will help to ensure that they won’t crack and break easily. Next, it is more difficult to break than air-tight, which will make it harder for criminals to gain access to your home. Lastly, it works better with the climate you live in, so it will provide your home with better protection against the elements.

iPhone Screen Repair Prices

 

Puls offers fast, affordable iPhone screen repair service at your time and place. iPhone repair can come to you in the morning, work, home, or at the gym, and get your damaged iPhone screen fixed in as little as 60 seconds for affordable prices. Our expert iPhone service technicians are available around the clock to take your iPhone repair just as fast as you need it. With a full array of choices, we’ll help you fix your iPhone’s most common problems and quickly!

iPhone repairs have become extremely popular because of their flexibility. You can get a replacement iPhone with just a few days for a minimal investment. If you get a cracked screen, we can replace it with a new one, or if there is liquid damage, we can replace it with a functional battery. And since iPhone parts are compatible with all of our other products, you can get an iPhone replacement with just a few hours of extra time. After all, that is how simple it is to ship an iPhone to the manufacturer for a replacement. Your iPhone is a great asset that is part of your mobile media system, so investing just a few minutes of your time in iPhone repair saves you from hours of inconvenience.

iPhone repairs are also convenient because the process can be done in your home or office, saving you time and money. It doesn’t matter what type of damage you might need to fix from a cracked screen to water damage, accidental damage, or a hardware malfunction. Your local iPhone service center can help you with any of these problems, and with a full range of services, including screen replacement, at an affordable price. Even if you need the full service, many of our local iPhone service centers offer upgrades so you don’t need to keep buying a new unit after just a few issues.

While screen replacement isn’t always necessary, it’s often the most convenient option. In addition to being able to simply take your iPhone in to get a screen repaired, many people want the convenience of going into their local service center instead of having to drive to the store. Many people who have small children or pets would prefer not to bring the phone into the car, where it could easily be damaged by an in-car accident. iPhone replacement screens are also a good choice when traveling on an airplane, as cracked screens are usually not accepted.

If your iPhone has fallen victim to an accident, you should first make sure that you have legal liability insurance, as any damage or loss must be covered. Next, contact your cell phone provider to find out what type of coverage you have for accidental damage. Most providers offer at least $500 for an iPhone repair or replacement, but depending on the brand and year, this amount could increase or decrease. If you own an iPhone, it’s a good idea to check with your service provider to see what types of payment plans are available to you, as this can help you to pay for the service fee in a manner that is convenient for you.

When you need iPhone screen repairs, there are several options available to you. Some repairs are available through the manufacturer, while others can be done at your local service station or Apple store. You can also purchase iPhone replacement parts from third-party companies, which will allow you to keep your iPhone but pay less for the repair. If you decide to purchase iPhone parts, you may be able to choose between different brands and models than you would if you purchased from the manufacturer. However, you should be careful to read customer reviews to ensure that the parts you purchase are high quality and fit your specific needs.

While most people are happy to get their iPhones repaired rather than replace them, there are some circumstances in which it makes more sense to get them repaired rather than replace them. If your iPhone gets dropped, damaged while playing sports or dropped by a friend, it is usually worth spending the money to get it repaired rather than having to buy a new one. In addition, it is often less expensive to have your iPhone repaired than it would be to buy a new one because you can often get your devices repaired for a few hundred dollars rather than buying new parts. While there are many reasons why you might prefer to have an iPhone repaired rather than buying a new one, it is really a matter of preference based on how much money you have available to spend, how long you want to have it away from you and the characteristics of your particular iPhone.

For example, if you drop your iPhone into a bucket of water and it is damaged, you can easily take it to an iPhone repair shop and have it repaired for a few hundred dollars. However, if your iPhone slips out of your hand, gets stuck in a door or other difficult-to-reach areas, flops through a crack in a window, gets caught up in the pet door of a car and breaks down on a busy street, you may not be able to get it repaired. On the other hand, if your iPhone breaks down because of a low battery or the inability to turn on, you will probably not be able to get a new iPhone. If your iPhone stops working after you install some new software, it may be too complicated for Apple to replace them. There are other reasons that it could happen, but the main thing is that your iPhone can be fixed rather than replaced.

Whether your iPhone is covered by Applecare or not, it is still worth it to have it repaired by a professional. With professional repair services, you are guaranteed to get a working phone in a short amount of time. You can also rest assured that your screen will be in good condition once it is fixed. The Applecare coverage for iPhones lasts for a full year. It is cheaper to have your iPhone repaired by an Apple expert than it is to buy a new model, especially when it is within the warranty period.

Some people worry about the high cost of iPhone screen repairs. If you are going to hire a professional service to fix your iPhone, you need to know that this cost will be included in the service plan. The cost of the repair could even be covered by your insurance policy, depending on the plan that you have. There is no such thing as an accidental damage coverage, so you will not be able to get any coverage for this fee. Although this fee is not included in the price of the iPhone repair, it is still worth looking into.

 

Why You Should Consider Hiring a Professional SEO Company For Your Business

 

The main reason why SEO Wellington is so well established is because of its highly professional approach. It does all the necessary steps in the right order to get a top ranking on major search engines.

The SEO company offers a variety of services including content writing, article marketing, web designing, blog creation and promotion. This is one company that provides all services required for your business. With the right strategies, you can achieve a high rank and an increase in the traffic to your site.

The SEO team works with all the aspects of your website development. It not only implements the right content on your website but also gives you detailed guidance on the web design. If you hire a professional SEO firm, it will ensure that your site looks professional as well as unique.

The SEO company will provide the needed SEO tools and services that are needed by you. These tools and services include the use of Meta tags, keyword analysis, keyword suggestion, link building, online reputation management and several others. The use of these tools and services enables your website to be easily found by search engines such as Google. This will help you rank higher in search results.

The SEO company will analyze your website to find out what the best keywords are. With the right keyword selection, it will be easy for your website to get ranked on the search engines. With the right keywords, you can get targeted traffic.

When you hire a SEO company in Wellington, you will get the best SEO experts who will make the website look very attractive. With the right kind of graphics, the website can easily attract visitors from around the world.

The professionals at the SEO firm will take care of the search engine optimization. This means that they will look at the keywords, content and other factors that will help your site to rank on the major search engines. This way, you can have a great website and attract visitors from various countries.

The web design of the website is also important. The professionals at the SEO firm will help you get a perfect website that can be easily found by search engines. This will enable you to achieve a high ranking on the search engines.

This kind of company is known to be very professional. It is not a surprise that many clients opt for this kind of service as they can rest assured that they are being provided with high-quality services. The team at the firm also helps clients get the most accurate data. about the website traffic so that they can effectively use the search engines.

The professionals at the SEO firm will also make sure that the website is unique and that it contains correct keywords that are necessary for the success of the website. It also makes the website very easy to navigate. and user friendly.

If the website of a company looks good, the visitors keep coming back to the website. The website is also more likely to gain a higher ranking on the search engines as it has become easier to find the information you need.

The services of this type of company are effective in increasing the traffic to your website and making your business success. This is because they will always be on top of the search engine rankings.

They are aware of the latest techniques in order to promote your website. Their experience and expertise can provide you with the right kind of marketing tools that will help your website gain a high ranking in the search engine rankings. This will help you to reach a wider audience.

Finding SEO Services in Brisbane

 

There are many SEO services in Brisbane and their services are as varied as the cities themselves. Some of the areas that provide SEO services are:

Many service providers of SEO services have their head office in other areas like Sydney or Melbourne, but Brisbane is the home of a number of companies providing SEO services. The competition between these companies is stiff, so you need to be sure that you find the company that will work best for your business. However, the most important thing is to find the right company for your business.

Every website has a website address that is associated with the address of the owners of the search engines that crawl the Internet and index the information. This link, called a link, is based on a particular search engine that a site is affiliated with. This link is referred to as a search engine result, and when someone enters this search into a search engine, it results in a page that lists all websites that are associated with that search.

If you are a local business that does not have the time to build and maintain your own website, there are many services that can help you out with the process. SEO services are the backbone of Internet marketing, and they can make your website rank higher in the search engines. The most successful sites have the best SEO tools and techniques in place.

One SEO company in Brisbane that offers their services is World SEO. World SEO specializes in building websites and maintaining them. This includes writing and marketing, website design, and a variety of other areas. It is their service that allows them to get more traffic, which can then translate into increased sales and profits.

The online world has changed quite a bit over the years since search engine optimization was introduced, so there are some differences between webmasters and SEO services today. It is best to consult a professional if you are going to be adding a lot of content to your website. You do not want to miss a moment to add content, as this could be the difference between getting the link back up and not having it at all.

Some SEO services require the person doing the search engine optimization to add the information and then remove it as needed. This can cause a delay as it takes time to edit and maintain your website. When you hire an SEO company, they will know exactly what they are doing and they can get the job done quickly. They will also know how to keep your content fresh and relevant as the need arises.

You will have to pay a company to provide SEO services in Brisbane, but there are some very affordable services that you can choose from. You do not have to go through a search engine optimization firm to get the results you are looking for. There are many other solutions available for a company that needs to optimize their site.

When you are trying to decide which company to use, take the time to do a price comparison. You should also check with the company to see if you are paying for a part-time employee or if the cost of the SEO services is already covered by your current payroll. You do not want to waste your money on SEO services that you may not need later on.

Another reason you may choose to use an SEO company that is not located in Brisbane is that you do not want to spend your money on shipping and handling costs. Search engine optimization is a professional service and the fees should reflect that. This means that if you need the services sooner than you plan, you can move forward without having to worry about a huge bill coming from a company.

There are many different providers of SEO services in Brisbane. You should make sure that you get your SEO work done from the best company you can find. You will also want to make sure that the firm you choose has a track record of quality service.

If you need search engine optimization, Brisbane is the place to go. Make sure that you choose a company that will take care of your business. and give you results that you can be proud of.

CSS Gradients are about to Graduate!

Finally all browser vendors are on the same page when it comes to gradients

The Webkit team introduced CSS gradients on April 14th, 2008. Shortly afterwards they presented it to the W3C for consideration as a recommendation. Sometime later, Mozilla decided to implement CSS gradients using the same notation the Webkit gradients, but with the -moz prefix. After some time, however, they decided to replace that notation with a simpler one. Ever since, to do CSS gradients on the Web you had to write gradients the Webkit way for Safari and Chrome, and the Mozilla way for Firefox. Well, now all browser vendors have agreed to implement the same spec. At this time you can write a single notation that is identical for Safari, Chrome, Firefox, Opera and IE10.

Since version 5.1, Safari has supported the newer notation. Opera beta running Presto 2.10.299 fully supports the linear and radial notation, although the developer site only mentions support for the linear notation. Firefox, of course, already supports this notation. And the latest beta of IE10 does as well. This means that at some point all browsers will support this notation. Well, sort of.

Recently somebody at the W3C has been thinking a little too much. As of January 2012 the document CSS Image Values and Replaced Content Module Level 3 now has a slightly different notation. Since this just showed up, there is no support for it in any browser. And, since it is a working draft, it could change at any time. So, at this time, I’m going to ignore what the document says and just cover what the latest browsers have agreed to support.

Because CSS gradients are still a draft proposal, all browser vendors use their respective prefixes with the notation. This is a good thing since the spec is in flux. They shouldn’t change their present implementation until the spec reaches recommendation status, in which case they can implement the final version of CSS gradients without their vendor prefixes.

Webkit: -webkit-
Mozilla: -moz-
Opera: -o-
Microsoft: -ms-

CSS gradients are rendered as a background image. That means that all of the properties of the CSS background module apply to CSS gradients. In other words, you can have multiple gradients on the same element and control their size and position as well, or use them as image masks. Also, whereas in the past you might have used a background color in conjunction with a background image, you can now use a background gradients as the backdrop for a background image, or you could have a transparent gradient layered over a background image. The ability to stack up gradients while controlling their size, position and repetition means you can create complex repeating patterns that would normally require a background image. The ability to define multiple background images results in a layered affect not unlike Adobe Photoshop’s layers. The new CSS filters module will increase the comparison with Photoshop further my providing many color filters, such as reverse, multiply, dodge, burn, darken, lighten, grayscale, etc. With JavaScript you could also manipulate the properties of your CSS gradients to produce a background pattern that morphs in real time.

Linear Gradients

The notation for linear gradients is quite simple and straightforward. First thing, you’ll be defining it as a background image on an element. CSS uses functions that create the gradient according to the arguments you provide. For linear gradients, the values you’ll need are as follows:

1

[<point (one value, two values or degrees)>]?, <color [stop]?>, <color [stop]?>

From the above definition we can see that all values are optional, except the start and end colors.

The first value (point) is optional. If no value is provided, it will default to drawing the gradient from top to bottom. You can use keywords for the position. These can be a single keyword or a combination of two. You can also use any valid degree values. The purpose of these point definitions is to define which direction the gradient flow towards. You also need to provide at least two colors. The first color will be where the gradient starts from, and the last color will be where the point indicates. So a gradient with yellow and blue and a point value of top will start at the bottom with yellow and end at the top with blue. Here re possible point values:

– top
– right
– bottom
– left
– top left
– top right
– bottom left
– bottom right
– 0deg
– 11deg
– 67deg
– 182deg
– -45deg
– -90deg

Colors can have optional stop values. If no stops are provided, the colors will blend equally from the first to the last.You can provide as many colors as you want to create the gradient, and you can vary their widths by providing stops. The value of the stops can use any valid CSS length identifier (px, pt, em, %, etc.). The position value is placed after the color. You can use any valid CSS colors, such as keywords (red, yellow, blue), or hex, hsl, rgb or rgba values. Regardless of what the stop position is for the last color, that color will continue filling the element the rest of the way.

1
2
3

background-image: linear-gradient(top, yellow 10px, red 80px);
background-image: linear-gradient(top right, orange, green 30%, yellow 70%);
background-image: linear-gradient(60deg, red, white, blue 50%);
Repeating Linear Gradients

Repeat linear gradients are easy to do. Actually, the same effect can be achieved with background size and background repeat properties, but it is nice to have it I suppose. It works the same way as regular linear gradients, except that you use repeating-linear-gradient as the function:

1
2
3

background-image: repeating-linear-gradient(top, yellow 10px, red 80px);
background-image: repeating-linear-gradient(top right, orange, green 30%, yellow 70%);
background-image: repeating-linear-gradient(60deg, red, white, blue 50%);
Radial Gradients

The notation for radial gradients is similar to linear gradients, except that you can specific a shape argument to control how the radial is produced. Here’s the possible values:

1

[<position (two separate values)>]?[[<shape (literal value or length value)>] || [<size length value>]>]? <color [stop]?> <color [stop]?>

From the above definition we can see that all values are optional, except the start and end colors, just like linear gradients.

If no value for position is supplied, the radial gradient will be centered in the element. Position is based on the center of the radial gradient. It accepts the same values as background position. Those values include percentages, lengths and keywords. Just like background positioning, you can use negative values to move the center of the radial gradient off the screen. Percentages and lengths require two values, the first defining the x axis and the second defining the y axis.

1
2

percentage: 0% 0%, 20% 60%, 50% 50%
length: 0px 0px, 24px 45px, 3em 5em

The keywords are: top, right, bottom, left and center. You could combine these in various ways:

1

top left, bottom right, center center, center right, top center

Shape can be either circle or ellipse. If no shape is supplied, if the length value is single, it defaults to a circle with a radius defined by that length. Otherwise, if no shape is supplied and two lengths are passed, it uses those to draw an ellipse. The first value determines the width, the second the height:

1
2
3
4

// A vertical ellipse:
background-image: radial-gradient(center, 100px 400px, red, white);
// An horizontal ellipse:
background-image: radial-gradient(center, 400px 100px, red, white);

If you use one of the shape keywords, you can also use size keywords to control how the radial gradient is draw in relation to its container. The size keywords are:

– closest-side
– farthest-side
– closest-corner
– farthest-corner

First of all, these keywords only work when you use a shape keyword. Defining the shape of the radial gradient with lengths and then trying to use these size keywords will not work. So, this is how these size keywords work. If the container is narrower than it is tall, the size of circle or ellipse will be restrained by the left and right of the container. With farthest-side, it would be restrained by the top and bottom of the container, probably resulting in the left and right extending beyond those sides. Be aware that these work in relation to the position of the radial gradient. That means that if it is positioned near the top left, it will be rendered differently than if it were centered. Closest-corner and farthest-corner work just like closes-side and farthest-side. The best way to get the hang of these keywords is to play around with a radial gradient to see how they affect it. Although these keywords are nice conveniences, you’ll see that they are far from exact. If you need precise placement and size, you’re better off using lengths to define the size of your radial gradient.

Color and stops work similar to linear gradients. The first color defined the color drawn from the center of the radial gradient. The last color will define the outermost color of the gradient. Stops allow you to define more precise positioning of those colors in the radial gradient.

Repeating Radial Gradients

Like repeating linear gradients, it is possible to create the same effect as a repeating radial gradient. You’d just need to define it tediously repeating the colors and providing appropriate stops. In contrast, using the repeating-radial-gradient function makes this easy.

Practical Examples

Enough with theory. Let’s look at what we can do with linear and radial gradients. By layering them and controlling their size and positioning, we can create complex patterns that we can use as Web assets. Please note that in all of the following examples I’m presenting the gradients without vendor prefixes. To have them render in a browser that currently supports CSS gradients, you would need to provide the appropriate vendor prefix for that browser. When the current spec reaches recommendation status, browser vendors will drop their prefix.

In most of these examples I’ve used a transparent gray. This was so I could just add an background color to show through the transparency. Having the color controlled by the background color makes it easy to change the feel of the pattern.

Here’s a vertical stripe with the transparent gray stripe is separated by a 1 pixel transparent stripe:

1
2
3
4
5

background-image:
linear-gradient(0deg,
rgba(0,0,0,0.1) 75%,
transparent 75%);
background-size: 5px 100%;

 

Here’s the same stripe horizontal:

1
2
3
4
5

background-image:
linear-gradient(90deg,
rgba(0,0,0,0.1) 75%,
transparent 75%);
background-size: 100% 5px;

 

And here it is slanted to the left:

1
2
3
4
5
6
7
8
9

background-image:
linear-gradient(45deg,
transparent 15%,
rgba(0,0,0,0.1) 15%,
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent 65%,
rgba(0,0,0,0.1) 69%);
background-size: 6px 6px;

 

And then to the right:

1
2
3
4
5
6
7
8
9

background-image:
linear-gradient(-45deg,
transparent 15%,
rgba(0,0,0,0.1) 15%,
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent 65%,
rgba(0,0,0,0.1) 65%);
background-size: 6px 6px;

 

Now lets have some fun with repeating linear gradients. Here’s vertical repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(0deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Horizontal repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(90deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Left slanted repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(45deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Right slanted repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(-45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px);

 

Now lets cross them:

1
2
3
4
5
6
7
8
9
10
11

background-image:
repeating-linear-gradient(0deg,
transparent 0,
transparent 5px,
rgba(0, 0, 0, .1) 5px,
rgba(0, 0, 0, .1) 10px),
repeating-linear-gradient(90deg,
transparent 0,
transparent 5px,
rgba(0, 0, 0, .1) 5px,
rgba(0, 0, 0, .1) 10px);

 

And now criss-cross them:

1
2
3
4
5
6
7
8
9
10
11

background-image:
repeating-linear-gradient(-45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px),
repeating-linear-gradient(45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px);

 

Enough with stripes, let’s get square:

1
2
3
4
5
6
7
8

background-image:
linear-gradient(180deg,
rgba(0,0,0,0.05) 75%,
transparent 75%),
linear-gradient(90deg,
rgba(0,0,0,0.05) 75%,
transparent 75%);
background-size: 5px 100%, 100% 5px;

 

And a nice checkerboard pattern:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
linear-gradient(45deg,
rgba(0,0,0,0.1) 4.5px,
transparent 5px,
transparent 16px,
rgba(0,0,0,0.1) 16px,
rgba(0,0,0,0.1)),
linear-gradient(45deg,
rgba(0,0,0,0.1) 4.5px,
transparent 5px,
transparent 16px,
rgba(0,0,0,0.1) 16px,
rgba(0,0,0,0.1));
background-position: 0 0, 8px 8px;

 

And let’s make those diagonal:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
linear-gradient(45deg,
rgba(0,0,0,0.1) 25%,
transparent 25%),
linear-gradient(-45deg,
rgba(0,0,0,0.1) 25%,
transparent 25%),
linear-gradient(45deg,
transparent 75%,
rgba(0,0,0,0.1) 75%),
linear-gradient(-45deg,
transparent 75%,
rgba(0,0,0,0.1) 75%);
background-size: 10px 10px;

 

Now that we have them diagonal, lets spice them up and turn them into an argyle pattern:

1
2
3
4
5
6
7
8
9
10
11
12

background-image:
linear-gradient(right top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent),
linear-gradient(left top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent);
background-size: 12px 12px;

 

OK, now lets take another look at stripes. But this time we want to shake things up about. We want to get out to the monotony of strictly repeating patterns, but still have a pattern. What I’m talking about is sometimes called the Cicada principle. It produces a pattern that doesn’t repeat itself exactly. It does this my layering different repeating patterns, except that these are different proportions, similar to the progression of prime numbers. Using this principle, I’ve created a series of overlapping lines that creates a textile like pattern that retains it’s randomness. Here’s the CSS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

background-image:
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 25%,
transparent 25%,
transparent),
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 17%,
transparent 17%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 13%,
transparent 13%,
transparent);
background-size: 10px 100%, 17px 100%, 21px 100%, 100% 10px, 100% 17px, 100% 21px;
backgroud-position: 0 0, 6px 0, 14px 0, 0 0, 0 6px, 0 16px;

 

Now lets play with radial gradients. We’ll start with basic patterns and build up to more complex combinations.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 45%,
rgba(0,0,0,0) 50%,
rgba(0,0,0,0) 95%);
background-size: 8px 8px;

 

Now we’ll take the above pattern and turn the dots inside out so that the pattern looks like someone cut holes in the color.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0),
rgba(0,0,0,0) 50%,
rgba(0,0,0,0.1) 55%,
rgba(0,0,0,0.1) 95%);
background-size: 10px 10px;

 

Now we’ll just play with the size of circles a bit.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 9px,
rgba(0,0,0,0) 9px,
rgba(0,0,0,0) 17px);
background-size: 18px 18px;

 

OK, I now the above patterns are not revolutionary or anthing. Now we’re going to get creative. For the next ones we’re going to user colors, yeah! The next pattern has a gold background with orange and greenish polka dots:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,0,0,0.2),
rgba(255,0,0,0.2) 4px,
rgba(255,255,255,.10) 5px,
rgba(255,255,255,.10) 7px),
radial-gradient(
rgba(0,0,0,0.2),
rgba(0,0,0,0.2) 4px,
rgba(255,255,255,.25) 5px,
rgba(255,255,255,.25) 7px);
background-size: 18px 18px;
background-color: #ffd239;
background-position: 10px 10px, 0% 0%;

 

The next one I call puff balls because of their look:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,255,255,0) 90%,
rgba(255,255,255,.5) 90%,
rgba(255,255,255,.5)
),
radial-gradient(
rgba(255,255,255,0.01),
rgba(255,255,255,0.01) 10%,
rgba(255,255,255,255.1) 70%,
rgba(0,0,0,0) 79%,
rgba(0,0,0,0) 96%);
background-size: 20px 20px;
background-color: #ff77a1;

 

Here’s another gold pattern with four-pointed stars:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,0,0,0.2),
rgba(255,0,0,0.2) 8.5px,
rgba(255,255,255,.5) 9.5px,
rgba(255,255,255,.5) 17.5px),
radial-gradient(
rgba(0,0,0,0.2),
rgba(0,0,0,0.2) 8.5px,
rgba(255,255,255,.15) 9.5px,
rgba(255,255,255,.15) 17.5px);
background-size: 18px 18px;
background-color: gold;
background-position: 9px 9px, 0% 0%;

 

And here we change the background to green:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,210,57,0.42),
rgba(255,210,57,0.42) 9px,
rgba(0,0,0,0) 11px,
rgba(0,0,0,0) 15px),
radial-gradient(
rgba(0,0,0,0),
rgba(0,0,0,0) 9px,
rgba(255,210,57,1) 10px,
rgba(255,210,57,1) 15px);
background-size: 17px 17px;
background-color: #1e8e04;
background-position: 8.5px 8.5px, 0% 0%;

 

And finally, we do some interesting overlap with the radial gradients:

1
2
3
4
5
6
7
8
9
10
11
12
13

background-image:
radial-gradient(
rgba(255,255,255,0),
rgba(255,255,255,0.5) 14px,
rgba(255,255,255,0) 14px,
rgba(255,255,255,0) 26px),
radial-gradient(
rgba(0,0,255,0.31),
rgba(0,0,255,0.31) 14px,
rgba(255,255,255,0) 16px);
background-size: 28px 28px, 28px 28px;
background-position: 14px 18px, 0% 18px, 0% 0%;
background-color: rgba(200,250,190,0.5);

 

You can see these gradients in action here. You can same the page to your desktop, since it is a self-contained document.

Proposed Changes to Spec

So, as I mentioned, since January 2012 the draft for CSS gradients at the W3C has some notation changes. Really their minor, but in my opinion, not necessary. Actually, I’m irritated by them. The two owners of the document: Elika J. Etemad and Tab Atkins Jr., from Mozilla and Google respectively, have decided to make the notation more English-like by requiring prepositions for the position keywords for linear and radial gradients. So if you had a yellow to red linear gradient that ended in the bottom right, you’d need to write the following:

1

linear-gradient(to bottom right, yellow, red);

For a radial gradient, it would be

1

radial-gradient(circle at closest-side, yellow, red);

OK, so if the point is to make it more English-like, shouldn’t it be:

1

linear-gradient(to the bottom right, yellow, red)

Or better yet:

 

Or:

1

radial-gradient(a circle positioned at closest-side, yellow, red);

And, last time I check, a big chuck of the world doesn’t know what the English word “to” means and so it adds no clarity to what the keywords are doing. I’m totally against requiring unnecessary English grammatical constructs in to CSS. We don’t do that with HTML or JavaScript. What strikes me as really odd, one of the authors is from Mozilla. They were the guys that complained that the original Webkit notation used “to” and “from” to designate the start and end colors. Now they want to make the simpler notation more complicated. Adding prepositions to keywords for gradients will not add any new functionality nor prevent any rendering errors. They just make the notation more wordy. Fail! Making CSS more English-like is a rabbit hole down which you do not want to go.

March 23, 2012

Since writing this post there has been some ongoing discussion at CSS Working Group about the reasoning behind the use of prefixes in the new syntax. The gist of it is that prepositions actually remove the ambiguity of direction when dealing with gradients. Here’s a quote from the discussions:

The “to” keyword was added to linear gradients because there was
significant confusion about whether “top” meant “start from the top
(put the 0% color on the top)” or “point toward the top (put the 100%
color on the top)”.

Radial gradients gained keywords in an attempt to make the syntax more
flexible and more readable – previously, for example, you could have a
declaration like “radial-gradient(20% 20%, 30% 30%, black, white)”.
It’s very unclear what that means – even if you know that one of them
is a position and the other is a size, how can you tell which is
which? Due to this ambiguity, the syntax also disallowed specifying
just a size without a position.

The new syntax, while not ideal in some ways, solves this problem –
you’d write the previous example as “radial-gradient(30% 30% at 20%
20%, black, white)” which gives you some clues as to which is the size
and which is the position. As well, it’s now possible to specify
either a size or a position alone, and have it parsed unambiguously –
“radial-gradient(30% 30%, black, white)” has an explicit size and
default position, while “radial-gradient(at 20% 20%, black, white)”
has an explicit position and default size.

In light of the above I’ve been won over to support prepositions in the gradient syntax. It solves the problems described above and will make creating gradients easier for everyone.

Practical Examples of the Flexible Box Model

If there’s one thing in CSS3 that really gives me warm fuzzies, it’s the flexible box model. What it does is provides a way to create many layout affects that otherwise would require workarounds with float or positioning or both. And there are many types of layouts that without out it would require JavaScript to create the same effect. Sadly, at present the flexible box model is only implemented in Firefox, Safari and Chrome. As it turns out, Microsoft’s IE team approached the W3C standards teams with a proposal for a grid-based layout module. It appears to be based on experience implementing the Silverlight grid layout system, which is a good thing. Silverlight grids are a powerful layout tool and is the most important feature for creating interfaces with Silverlight. Because this grid proposal is very solid, the W3C has dropped all further work on the flexible box model and instead are moving ahead in finalizing the draft for the grid layout module. If you read that speck, you’ll realize how much we need a CSS grid system. For now, however, we do have the flexible box model working in Firefox, Chrome and Safari, as well as on mobile Webkit, which includes iOS, Android, WebOS, and Blackberry. This means that if you’re doing mobile development you can use the flexible box model today to help you implement your layout needs. Once you start using the flexible box model, you’ll hate having to go back to situations where it’s not available.

The flexible box model got a lot of attention from a post by Alex Russell back in August 2009. The good thing is that in his post he showed some of the practical things that the flexible box model addresses and provided a stylesheet with a small subset of the flexible box model properties that people could use right away. His post has been replicated and linked to all over the Web. Unfortunately a lot of people who are not familiar with the spec for the flexible box model are under the impression that what’s in his stylesheet is it. So, with that in mind I’m loosing another stylesheet on the public that allows a greater utilization of the flexible box model. I’ll also give you a layout where a lot of these are in use so that you can see how they work.

Before I get going let me say this. The flexible box model is not perfect. It isn’t supported by IE9 or Opera. And now it looks like the W3C is bypassing it for a more robust grid system. Personally, I’d like to see something like the Silverlight grid system combined with aspects of the flexible box model. That would be the best of both approaches. If you’re targeting the mobile Web, in other words you intend on target Webkit browsers, you can expect robust support for the flexible box model. I doubt it’s going to go away just because the W3C doesn’t include it in any recommendation. I expect it to remain in Webkit for the foreseeable future because it’s already been in use for a number of years.

The flexible box model is about the way a collection of child nodes gets laid out in relation to each other and their parent node. To achieve its layout goals, the flexible box model offers properties for the parent node as well as for the child nodes that determine the layout characteristics of the child nodes.

To work with the flexible box model you need to define its display property to box:

1
2
3
4
#myDiv {
    display: -webkit-box;
    display: -moz-box;
}

Elements with display set to box can order their child nodes in two orientations: vertical or horizontal. If no orientation is provided, the box defaults to vertical:

1
2
3
4
5
6
#myDiv {
    display: -webkit-box;
   -webkit-box-orient: horizontal;
    display: -moz-box;
    -moz-box-orient: horizontal;
}

Besides defining the orientation, you can also designate what direction the child elements stack, either normal or reverse. A box direction of reverse means the elements display in the opposite order in which they physically appear in the document, so that the first would be last and the last first. By default the box direction is normal stacking order.

Then there is the packing order. This allows you to define how the child elements are packed inside the parent. By default they are packed in from the beginning of the parent. For vertical orientation this is the top and for horizontal orientation this is the left. Other packing orders are end, center and justify. If the packing order is end, for a vertical orientation the elements will stack up from the bottom. For a box with horizontal alignment, the boxes will stack from the right. A packing order of center means that for vertical orientation the child elements will be centered vertical with any left over space displayed equally at the top and bottom. For horizontal orientation a packing order of center means the elements are centered horizontally with left over space equally divided on the left and right. A packing order of justified means that any available space is spread equally between the child elements, for vertical orientation this is vertical spacing, and for horizontal orientation this is horizontal spacing.

Box-align-start

A box with alignment set to “start”

box-align-end

A box with alignment set to “end”

box-align-center

A box with alignment set to “center”

And elements can have their box alignment defined. The default is stretch. This stretches the dimensions of the child elements to fill the parent box. If the alignment is start, for horizontal orientation the elements are aligned to the top of the parent. If the orientation is vertical, they are aligned to the left of the parent. An alignment of end will align elements with horizontal alignment to the bottom of the parent. With vertical orientation they will be aligned to the right of the parent. An alignment of center will align horizontal elements along the horizontal center of the parent and for vertical orientation it will center them along the vertical center of the parent. There is also an alignment of baseline, but this is only for horizontal orientation. It aligns the elements along their horizontal baseline.

Then there is a set of properties that you can define on the child elements. These are flex and ordinal group. The flex property tells the browser how to deal with the dimensions of the child element. If you have three child elements and they don’t fill their parent, giving one of the a value of flex:1 will cause that element to take up all the left over space. If you gave one element flex: 1 and another one flex: 2, the available space would be divided up such that the element with flex: 1 would get one third of the available space and the element with flex: 2 would get two thirds of the available space. Of course the element with no flex value would default to whatever its width is. The ordinal group property allows you to designate groups of elements so that they appear in a different order than their document order. I’m not so sure about the practical use for this property. I’ve thought about it for months and have not been able to come up with a use case where I would need it. But it’s there.

I’ve created a flexible box model stylesheet with classes for all the various box properties. This means you can add the classes to an element to build out the definition you need for an element. I’ve also put together a interactive test case where you can dynamically toggle a number of the box properties and see their effect in real time. You can try it out online if you’re using Firefox, Chrome or Safari, or you can download the working example to dissect and learn.

Multiple Background Images & Animation

Multiple background images allow one to build up complex layered visual effects using one element. In the past such effects would require each background image rendered inside its own element, these being either nested or stacked on top of each other with positioning. When I was working on creating the progress bar example, I ran to a problem where I couldn’t seem to get a specific layer to animate. I could figure out what was going on. Recently, after looking at the code and fiddling with it, I found out what the problem was. Animation of background images works a little differently from other CSS properties. Because multiple backgrounds consists of multiple definitions, it works more like other properties with multiple property values: margins, borders, padding. For example, you can animate all borders on an element, otherwise you can animate a single border. Unfortunately, with multiple backgrounds there is no easy way to single out an individual background image for animation as you can with a border, margin or padding property.

Now the thing to bare in mind when dealing with multiple background images is the stacking order. The first image defined is the topmost image, and the last image defined is the bottommost. Same thing with animations for multiple background images. So, in the case of the animated progress bar, I wanted to animate the bottommost gradient image which consisted of white slanted bars. The rest of the progress bar was fine stable. Well, except that I used a single animation which would instead affect the topmost layer, making it impossible for me to get the stacking layer they way I wanted. Here is the gradient:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
background-color: rgb(56,138,213);
background-image:
    -webkit-gradient(linear, 18 0, 0 10,
        color-stop(0.23, rgba(255,255,255,0)),
        color-stop(0.3, rgba(255,255,255,0.8)),
        color-stop(0.3, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,0.8)),
        color-stop(0.77, rgba(255,255,255,0))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0, rgba(255,255,255,.8)),
        color-stop(0.45, rgba(255,255,255,.05)),
        color-stop(0.55, rgba(0,0,0,.05)),
        color-stop(0.85, rgba(0,0,0,.2)),
        color-stop(0.98, rgba(0,0,0,.5))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0.20, transparent),
        color-stop(0.20, rgba(255,255,255,.5)),
        color-stop(0.32, rgba(255,255,255,.5)),
        color-stop(0.32, transparent));

To animate this, I was using a key-frame animation that moved the x axis of the background gradient across the element from 0 to 100% in a loop:

1
2
3
4
@-webkit-keyframes progressBarAnim {
    0% { background-position-x:  0%; }
    100% { background-position-x: 100%; }
}

If you ran my previous example of the progress bar, it animates as you would expect, except one problem. The topmost gradient layer is the part that should be on the bottom. Yet every time I positioned it to where I wanted it, it wouldn’t animate. In my mind I was thinking that the key frame animation defined above would be animating all the background images. Actually, it doesn’t. It only animates the topmost image background, which is why I had to have the part I wanted to animate on top. Unfortunately I didn’t figure this out until recently. After a lot of fiddling and digging into what was going on with animation of multiple background images, I finally sorted it all out. When defining animations you have to start from the top and work you way down. You don’t have to include an animation for every background image, only down to the layer you need to. But you do have to include all the layers above the animated one up to the topmost one. So here’s my new stacking order for the CSS the way I actually wanted it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
background-color: rgb(56,138,213);
background-image:
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0, rgba(255,255,255,.8)),
        color-stop(0.45, rgba(255,255,255,.05)),
        color-stop(0.55, rgba(0,0,0,.05)),
        color-stop(0.85, rgba(0,0,0,.2)),
        color-stop(0.98, rgba(0,0,0,.5))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0.20, transparent),
        color-stop(0.20, rgba(255,255,255,.5)),
        color-stop(0.32, rgba(255,255,255,.5)),
        color-stop(0.32, transparent)),
    -webkit-gradient(linear, 18 0, 0 10,
        color-stop(0.23, rgba(255,255,255,0)),
        color-stop(0.3, rgba(255,255,255,0.8)),
        color-stop(0.3, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,0.8)),
        color-stop(0.77, rgba(255,255,255,0)));

And here’s the key frame animation, notice the extra animations for the upper layers:

1
2
3
4
@-webkit-keyframes progressBarAnim {
    0% { background-position-x:  0%, 0%, 0%; }
    100% { background-position-x: 0%, 0%, 100%; }
}

So remember, in the above key frame animation the first value if for the topmost layer and the last value is for the bottom most layer.

To show the difference in the stacking order, I changed the white stripe that goes horizontally across the progress bar to black. In the wrong stacking order version you can see that its actually behind the white stripes. The corrected version with multiple background animations has it correctly on top:

 

progress bar with incorrect stacking order

progress bar with incorrect stacking order

 

progress bar with correct stacking order

progress bar with correct stacking order

 

Of course, the final product would not be a black streak, it would be white. This was just to show how the stacking order was previously wrong.

Advertisements