图片网址之外的CSS形状无效

时间:2019-06-12 04:12:01

标签: html css

我正在尝试创建外形,到目前为止,我失败了,如何处理这种情况? 我已经制作了图片:

  • PNG扩展名中的透明背景
  • 在左侧浮动。

根据我的阅读,这些似乎是此举的唯一条件。

我已经将图像存储在Google驱动器中,我想知道当恢复到我的位置时Google驱动器是否会使图像不透明。

.page{
    display:flex; 
}

.img{
  float: left;
  height:550px;
  margin:50px 0 0 50px;
  shape-outside: url(https://docs.google.com/uc?id=1GIboZJR9L7lXyvvwBrxGDrR9N9SjntE4);
}
<div class="page" >
<img 
     class="img"
     src="https://docs.google.com/uc?id=1GIboZJR9L7lXyvvwBrxGDrR9N9SjntE4"/>
   <p>One November night in the year 1782, so the story runs, two brothers sat over their winter fire in the little French town of Annonay, watching the grey smoke-wreaths from the hearth curl up the wide chimney. Their names were Stephen and Joseph Montgolfier, they were papermakers by trade, and were noted as possessing thoughtful minds and a deep interest in all scientific knowledge and new discovery. Before that night—a memorable night, as it was to prove—hundreds of millions of people had watched the rising smoke-wreaths of their fires without drawing any special inspiration from the fact.</p>
</div>

任何提示都很好

1 个答案:

答案 0 :(得分:1)

检查您的错误控制台:

  

访问图像   来自的“ https://docs.google.com/uc?id=1GIboZJR9L7lXyvvwBrxGDrR9N9SjntE4”   原点“ null”已被CORS政策阻止:否   请求中存在“ Access-Control-Allow-Origin”标头   资源。

您无法从该资源加载图像。另外请注意,shape-outsidenot supported by microsoft browsers

相关问题