使用css在子菜单中创建子菜单

时间:2015-08-12 12:21:42

标签: html css

我正在子菜单中创建一个带子菜单的导航,但它无法正常工作。我已经尝试过互联网上的样本,但是当我实施它时。我遇到了一些问题。我无法正确定位子菜单。我是新手,我希望你能帮助我。

public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    ViewPager postImagesViewPager;
        ImagePipeline imagePipeline = Fresco.getImagePipeline();
        Uri uri = Uri.parse(CommonUtilities.SERVER_IMAGE_URL +"user_background_" +userid+ ".jpeg?w=600&h=300"); 
        ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri).build();
        DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(request,getActivity());

    DataSubscriber<CloseableReference<CloseableImage>> dataSubscriber =  new BaseDataSubscriber<CloseableReference<CloseableImage>>() {

        @Override
        protected void onFailureImpl(DataSource<CloseableReference<CloseableImage>> arg0) {
            // TODO Auto-generated method stub
            System.out.println("Failed");
        }
        @Override
        protected void onNewResultImpl( DataSource<CloseableReference<CloseableImage>> arg0) {
            // TODO Auto-generated method stub
            if (!arg0.isFinished()) {
              System.out.println("Not yet finished - this is just another progressive scan.");
            }  

            CloseableReference<CloseableImage> imageReference = arg0.getResult();
            if (imageReference != null) {
              try {
                  CloseableBitmap image = (CloseableBitmap)imageReference.get();
                  Bitmap bitmap = image.getUnderlyingBitmap();
                  viewpagerDrawable = new BitmapDrawable(context.getResources(),bitmap);
                  postImagesViewPager.setBackground(viewpagerDrawable);

              } catch(Exception e){
                  e.printStackTrace();
              }
              finally {
                imageReference.close();
              }
            }
        }
    };
    Executor ex = new Executor() {
        @Override
        public void execute(Runnable command) {
            command.run();
        }
    };
    Runnable runr = new Runnable() {
        @Override
        public void run() {
            System.out.println("Runnig to get image from facebook.......");
        }
    };
    dataSource.subscribe(dataSubscriber, ex);
    ex.execute(runr);

    return _rootView;
}
SELECT  A.MONTH,(SELECT SUM(AMOUNT) FROM V_HR_PP_PROCESS_DATA 
WHERE EMPLOYER_CODE = A.EMPLOYER_CODE AND TAX_YEAR = A.TAX_YEAR AND 
PROCESS_MONTH = A.MONTH AND EMPLOYEE_ID IN 
(SELECT EMPLOYEE_ID FROM I_HR_EMP_EMPLOYMENT_DTL 
WHERE EMPLOYER_CODE = A.EMPLOYER_CODE AND CONTRACT_TERM = 'P') AND 
PROCESS_MONTH BETWEEN 1 AND 10 AND PD_CODE = 'Z500') AS GROSS_PERMANENT,
(SELECT EMPLOYEE_NAME FROM I_HR_EMPLOYEE_MASTER),
(SELECT SUM(AMOUNT) FROM V_HR_PP_PROCESS_DATA WHERE EMPLOYER_CODE = A.EMPLOYER_CODE 
AND TAX_YEAR = A.TAX_YEAR AND PROCESS_MONTH = A.MONTH AND EMPLOYEE_ID IN
(SELECT EMPLOYEE_ID FROM I_HR_EMP_EMPLOYMENT_DTL WHERE EMPLOYER_CODE = A.EMPLOYER_CODE 
AND CONTRACT_TERM = 'F') AND PROCESS_MONTH BETWEEN  1 AND 10 AND PD_CODE = 'Z500') 
AS GROSS_CASUAL  FROM I_HR_SYS_DATE_MONTHLY A WHERE A.EMPLOYER_CODE = 'RAD' AND 
A.TAX_YEAR = 2014
    

我真的需要帮助。谢谢!

1 个答案:

答案 0 :(得分:0)

您可以查看以下链接。

Fiddle

  #nav {
width:800px;
margin:30px 50px;;
padding: 0;
float:left;
}
#nav li {
 list-style: none;
 float: left; 
 padding:0 10px;
}
//daf adf 
/*--temp--*/
#nav ul ul li {
clear:left;
}
#nav ul ul {
position:absolute;
left:14em;
top:0;
}
#nav ul ul li a {
display:block;
padding: 3px 15px;
color: #242424;
text-decoration: none;
font-size:13px;
font-family:"Lato" !important;
}
/*--end temp--*/
#nav li a {
display: block;
padding: 3px 15px;
color: #242424;
text-decoration: none;
font-size:13px; 
font-family:"Lato" !important;
}
 #nav a:hover {
color:#367FB3;
}
#nav a:active {
color:#367FB3;
}
#nav li ul {
display: none; 
width: 14em; /* Width to help Opera out */
background-color:transparent;
z-index:666;
}
#nav li:hover ul, #nav li.hover ul {
display: block;
position: absolute;
margin:0px -10px;
padding:0px; 
}
#nav li:hover ul ul {
  display:none; 
}
#nav li ul li:hover ul {
  display:block
}
#nav li:hover li, #nav li.hover li {
float: none; 
line-height:30px;
}
#nav li:hover li a, #nav li.hover li a {
 background-color:#367FB3;
 color:#fff;
 font-size:13px; 
 font-family:"Lato" !important;
}
#nav li li a:hover {
background-color:#52baff; 
color:#fff;
}