我有一些缩略图,我想在悬停时在它们上显示一些文本。我可以在悬停时使它们变暗,但不知道如何添加文本。
示例:http : //www.lenzflare.com/video-production-portfolio/
这是我所做的:
a {
display: inline-block;
overflow: hidden;
position: relative;
}
a:hover .play {
background:url(http://goo.gl/yJqCOR) no-repeat center center;
opacity: 0.8;
position: absolute;
width: 200px;
height: 200px;
left: 50%;
top: 50%;
margin-left: -110px;
margin-top: -150px;
}
<a href="/">
<div class="play"></div>
<img class="img" src="http://i42.tinypic.com/2v9zuc1.jpg" />
<br />
</a>
Run Code Online (Sandbox Code Playgroud)
我有两个号码选择器,我想获得用户从号码选择器中选择的值.然后将它们转换为String.
任何的想法?
我正在尝试运行基于WorlBank API的应用程序.我有一个JSON URL来获取有关某个国家/地区的数据,然后在TextViews中显示它.简单.但只要我关闭运行应用程序.
这是我的文件:
主要活动:
public class MainActivity extends Activity {
//URL to get JSON Array
private static String url = "http://api.worldbank.org/countries/ir?format=json";
//JSON node Names
private static final String PAGE = "page";
private static final String VALUE = "value";
private static final String NAME = "name";
private static final String GEO = "region";
JSONArray page = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Creating new JSON Parser
JSONParser jParser = new JSONParser();
// Getting JSON from URL
JSONObject …Run Code Online (Sandbox Code Playgroud) android ×2
java ×2
css ×1
hover ×1
html ×1
javascript ×1
jquery ×1
json ×1
numberpicker ×1
textview ×1