5
I’m developing an angle portfolio, but I have a question about SCSS. I was interested in creating something that I don’t usually see much in portfolios, insert the portfolio background only in the upper or lower corner of the main div, that is, I leave an example in a print below.
In my HTML I have the following code:
<div class="background"></div>
<div class="ui grid content-main">
<div class="two wide column">
<div class="menu">
<div class="menuAvatar">
<img class="ui small circular image avatar" src="./assets/icons/avatar.svg">
</div>
<div class="ui list menuNavigation">
<div class="item" [routerLink]="['/about-me']" routerLinkActive="item-active">About Me</div>
<div class="item" [routerLink]="['/services']" routerLinkActive="item-active">Services</div>
<div class="item" [routerLink]="['/works']" routerLinkActive="item-active">Works</div>
<div class="item" [routerLink]="['/travel']" routerLinkActive="item-active">Travel</div>
<div class="item" [routerLink]="['/social']" routerLinkActive="item-active">Social</div>
<div class="item" [routerLink]="['/contact-me']" routerLinkActive="item-active">Contact Me</div>
</div>
<div class="menuCopyRights">
<p>Copyright © 2019 Ricardo Soares</p>
</div>
</div>
</div>
<div class="fourteen wide column content-pages">
<router-outlet></router-outlet>
</div>
</div>
The first div is my background with an Absolute position with width 100% and height 100% with a z-index at 0 and then I have my content. In terms of SCSS I was/am doing as follows:
.background{
position: absolute;
width: 100%;
height: 100%;
background-image: url('https://viagensasolta.com/wp-content/uploads/2018/12/Funchal_Cable_Car_Madeira.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
filter: brightness(75%);
z-index: -1;
}
.content-main{
height: 100%;
margin: 0;
background-color: white;
position: relative;
&:after {
content: "";
position: absolute;
border-left: 400px solid transparent;
border-top: 400px solid transparent;
top: 0px;
right:0px;
}
}
Where will I be failing here so that this is not working, because the triangle turns white, I can’t come to any conclusion.
Thank you this worked well!
– Ricardo Soares
@Ricardosoares cool that helped there! []s
– hugocsl