LICENSE, DISCLAIMER OF LIABILITY, AND LIMITED WARRANTY
By purchasing or using this book and disc (the Work), you agree that this license grants permission to use the contents contained herein, including the disc, but does not give you the right of ownership to any of the textual content in the book / disc or ownership to any of the information or products contained in it. This license doesnot permit uploading of the Work onto the Internet or on a network (of any kind)without the written consent of the Publisher. Duplication or dissemination of any text, code, simulations, images, etc. contained herein is limited to and subject to licensing terms for the respective products, and permission must be obtained from the Publisher or the owner of the content, etc., in order to reproduce or network any portion of the textual material (in any media) that is contained in the Work.
M ERCURY L EARNING AND I NFORMATION (MLI or the Publisher) and anyone involved in the creation, writing, or production of the companion disc, accompanying algorithms, code, or computer programs (the software), and any accompanying Web site or software of the Work, cannot and do not warrant the performance or results that might be obtained by using the contents of the Work. The author, developers, and the Publisher have used their best efforts to insure the accuracy and functionality of the textual material and/or programs contained in this package; we, however, make no warranty of any kind, express or implied, regarding the performance of these contents or programs. The Work is sold as is without warranty (except for defective materials used in manufacturing the book or due to faulty workmanship).
The author, developers, and the publisher of any accompanying content, and anyone involved in the composition, production, and manufacturing of this work will not be liable for damages of any kind arising out of the use of (or the inability to use) the algorithms, source code, computer programs, or textual material contained in this publication. This includes, but is not limited to, loss of revenue or profit, or other incidental, physical, or consequential damages arising out of the use of this Work.
Companion files that appear on the disc for this book can be downloaded from anFTP site by writing to the publisher at
The sole remedy in the event of a claim of any kind is expressly limited to replacement of the book and/or disc, and only at the discretion of the Publisher. The use of implied warranty and certain exclusions vary from state to state, and might not apply to the purchaser of this product.
Copyright 2017 by M ERCURY L EARNING AND LLC. All rights reserved.
This publication, portions of it, or any accompanying software may not be reproduced in anyway, stored in a retrieval system of any type, or transmitted by any means, media, electronicdisplay or mechanical display, including, but not limited to, photocopy, recording, Internetpostings, or scanning, without prior permission in writing from the publisher.
Publisher: David Pallai
M ERCURY L EARNING AND I NFORMATION
22841 Quicksilver Drive
Dulles, VA 20166
www.merclearning.com
800-232-0223
O. Campesato. CSS3 Pocket Primer.
ISBN: 978-1-938549-68-7
The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. All brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks, etc. is not an attempt to infringe on the property of others.
Library of Congress Control Number: 2016951110
161718321 Printed in the United States of America
Our titles are available for adoption, license, or bulk purchase by institutions, corporations, etc.
For additional information, please contact the Customer Service Dept. at 800-232-0223(toll free).
All of our titles are available in digital format at authorcloudware.com and other digital vendors. The sole obligation of M ERCURY L EARNING AND I NFORMATION to the purchaser is to replace the book, based on defective materials or faulty workmanship, but not based on the operation or functionality of the product.
Id like to dedicate this book to my parents may this bring joy and happiness into their lives.
CONTENTS
On the Companion Disc
Appendix A: jQuery Concepts
Appendix B: CSS Frameworks and Toolkits
PREFACE
WHAT IS THE PRIMARY VALUE PROPOSITION FOR THIS BOOK?
This book is primarily about CSS3, along with some of the technologies that can be combined with CSS3. In fact, there are several non-CSS3 chapters in this book, including one SVG chapter and one chapter that delves into HTML5 Canvas and CSS3. In addition, several chapters contain optional sections that show you how to combine jQuery with CSS3 and also jQuery with SVG. If you are unfamiliar with jQuery, you can read the Appendix that provides an introduction to jQuery. Another Appendix contains an introduction to an assortment of topics, such as frameworks for CSS3, SASS and LESS, Bootstrap 4, Material Design, and CSSLint.
WHAT IS THE FORMAT FOR THIS BOOK?
The answer to this question is important, because you obviously want to determine how much of the material in this book will be useful and relevant to you. First, this book is not a reference guide of CSS3 syntax, nor does this book contain any cheat sheets (but you can probably find the latter online). Although the format bears a very slight resemblance to a cookbook style, this book does not provide an extensive set of how-to code samples that solve many common tasks that you can probably find on Stackoverflow. Instead, the code samples in this book illustrate some core features of CSS3, and are supplemented with interesting effects that are possible in CSS3. Indeed, some code samples create effects that you are unlikely to find anywhere else. Even though you probably will not use all of the examples in this book, you will learn about various coding techniques, and perhaps you will be able to take advantage of them in order to craft your own variations for your Web pages.
WHAT DO I NEED TO KNOW FOR THIS BOOK?
The most important prerequisite ), familiarity with basic JavaScript is definitely necessary in order to understand the code samples. One way to get a better idea about this book is to glance through some of the code samples to get an idea of how much is familiar to you and how much is new for you. If you feel overwhelmed by too many unfamiliar concepts, then its probably advisable to select a different book. On the other hand, if you feel that the material is new yet within your grasp, you can fill potential gaps (obviously details vary in this book) by reading online tutorials. The decision making process regarding the purchase of this book is obviously important to you, and satisfied customers are important to the publisher and the author.
THE TARGET AUDIENCE
This book is intended to reach an international audience of readers with highly diverse backgrounds in various age groups. While many readers know how to read English, their native spoken language is not English (which could be their second, third, or even fourth language). Consequently, this book uses standard English rather than colloquial expressions that might be confusing to those readers. As you know, many people learn by different types of imitation, which includes reading, writing, or hearing new material (yes, some basic videos are also available). This book takes these points into consideration in order to provide a comfortable and meaningful learning experience for the intended readers.