Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

CSS - Background properties

0 votes
added Jul 18 in CSS by LC Marshal Lieutenant (12,590 points)
/*transparent #000 in rgba*/
.background {
    background: rgba(0, 0, 0, 0);
/*bg fr body */
background-image: url("../images/e7b335f7-pexels-photo-122244-large.jpeg");
background-repeat: no-repeat;
/*background-position: right top;*/
background-attachment: fixed;
/*gradient position*/
background: linear-gradient(45deg, red, blue);
background: linear-gradient(135deg, orange, orange 60%, cyan);
/*Learn more here:*/
/*100% width and height minus specific size*/
min-height: calc(100vh - 64px);
max-height: calc(100vh - 64px);
  backgrobund: url('') no-repeat fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
/*shadow style*/
input[type=text] {
  &:focus {
    box-shadow: 0 0 10px #ffac32;
/*faded black from bottom to top*/
  background-color: rgba(0,0,0,0.16);
  background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.4));
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(0,0,0,0)), to(rgba(0,0,0,0.4)));
  background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.4));
  background-image: -o-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.4));
  background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4));
  background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#66000000', GradientType=0);
  background-color: transparent;


1 Response

0 votes
responded Jul 18 by LC Marshal Lieutenant (12,590 points)
/*If you do not need to add a border on columns, you can also simply add a transparent border on them*/ 
[class*="col-"] {
  background-clip: padding-box;
  border: 10px solid transparent;

/*To force the child element to follow the parent container*/
box-sizing: border-box; - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.