1

background-imageを左右から一定の距離に配置したいと思います。コーナーに配置され、%または距離によってデザインが応答しなくなる
ため、使用したくありません。 そのためのCSSソリューションはありますか?right borromleft top

4

2 に答える 2

1

はい、このようなことをcalcで試すことができます。

.wrapper {
  background-image: url(http://www.bcebhagalpur.ac.in/images/Facebook.png);
  background-repeat: no-repeat;
  background-position: calc(100% - 40px) calc(100% - 40px);
  height: 300px;
  width: 50%;
  background-color: #DDD;
}
<div class="wrapper">
  <p>Lorem Ipsum Dolor set amet etc etc etc etc .....</p>
</div>

または、4辺の配置だけでそれを行うことができます:

.wrapper {
  background-image: url(http://www.bcebhagalpur.ac.in/images/Facebook.png);
  background-repeat: no-repeat;
  background-position: right 40px bottom 40px;
  height: 300px;
  width: 50%;
  background-color: #DDD;
}
<div class="wrapper">
  <p>Lorem Ipsum Dolor set amet etc etc etc etc .....</p>
</div>

于 2014-12-30T05:29:54.580 に答える
0

これを使って

.position
{
position:fixed;
right:200px;
bottom:150px;
}
于 2012-05-15T11:52:21.993 に答える