开发者

Add rounded corner mask to icon using $linkImg variable

Not as savvy on this as I'd like to be, so forgive me if my question is not phrased correctly.

Need to apply four rounded corners to a 119 x 119 App Store icon png auto pulled via a custom WordPress plugin using the variable $linkImg.

    $strHtml = "
<div style='border: solid 1px #00b7f3; background-color: #f8f8f8; width: 656px; height: 186px; padding: 0px; float: left; margin-top: 4px;'>
 <div style='float: left; width: 175px; margin: 0px; text开发者_Python百科-align: center; padding-left: 10px; padding-top: 15px;'>
  <img src='$linkImg' width='119' height='119' style='margin: 0px; padding: 15px;'/>
 </div>
</div>
";

Any ideas? (Btw, first post)

Edit 2 - This seems to do nothing, am I missing something obvious?

    $strHtml = "
<div style='border: solid 1px #00b7f3; background-color: #f8f8f8; width: 656px; height: 186px; padding: 0px; float: left; margin-top: 4px; border-top-left-radius: 50px 50px;'>
 <div style='float: left; width: 175px; margin: 0px;  text-align: center; padding-left: 10px; padding-top: 15px;'>
  <img src='$linkImg' width='119' height='119' style='margin: 0px; padding: 15px;'/>
 </div>
</div>
";


This is an issue of css not php.

Use inline css if you cannot link an external css file.

Try http://www.css3.info/preview/rounded-border for Css3 rounded corners.

And http://www.devwebpro.com/25-rounded-corners-techniques-with-css/ for other hacks.

*******edit**** I am using operamini so I can't read your code. Also I can't post comments due to a wierd js issue.

The problem with css3 is it is not supported by all browsers and each browser currently does not use the standard. You need to find the -moz- specific and -webkit- specific versions. It isn't guaranteed to work unless the browser uses an engine which supports it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜